From owner-svn-src-all@freebsd.org Sat Dec 1 17:59:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7C95132332D; Sat, 1 Dec 2018 17:59:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 681D46DF3E; Sat, 1 Dec 2018 17:59:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 436951B273; Sat, 1 Dec 2018 17:59:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB1Hxg9w083144; Sat, 1 Dec 2018 17:59:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB1HxgTL083143; Sat, 1 Dec 2018 17:59:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812011759.wB1HxgTL083143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 1 Dec 2018 17:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341377 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 341377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 681D46DF3E X-Spamd-Result: default: False [0.86 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.46)[0.455,0]; NEURAL_SPAM_MEDIUM(0.10)[0.096,0]; NEURAL_SPAM_LONG(0.31)[0.307,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2018 17:59:42 -0000 Author: cy Date: Sat Dec 1 17:59:41 2018 New Revision: 341377 URL: https://svnweb.freebsd.org/changeset/base/341377 Log: Restore handling of PMTU discovery, removed through an unifdef(1) following the MFV of r254219 into r255332. In addition the 'FreeBSD' macro was never defined in ipfilter 5.1.2 thus it never would have been enabled in the first place. This work is prompted by a general cleanup of the IP Filter code prompted by working to resolve a PR. More to follow. MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec 1 17:48:28 2018 (r341376) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec 1 17:59:41 2018 (r341377) @@ -85,6 +85,8 @@ static const char rcsid[] = "@(#)$Id$"; #endif extern int ip_optcopy __P((struct ip *, struct ip *)); +VNET_DECLARE(int, path_mtu_discovery); +#define V_path_mtu_discovery VNET(path_mtu_discovery) # ifdef IPFILTER_M_IPFILTER MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data structures"); @@ -477,11 +479,7 @@ ipf_send_ip(fin, m) IP_HL_A(ip, sizeof(*oip) >> 2); ip->ip_tos = oip->ip_tos; ip->ip_id = fin->fin_ip->ip_id; -#if defined(FreeBSD) && (__FreeBSD_version > 460000) - ip->ip_off = htons(path_mtu_discovery ? IP_DF : 0); -#else - ip->ip_off = 0; -#endif + ip->ip_off = htons(V_path_mtu_discovery ? IP_DF : 0); ip->ip_ttl = V_ip_defttl; ip->ip_sum = 0; break;