svn commit: r341377 - head/sys/contrib/ipfilter/netinet
Cy Schubert
cy at FreeBSD.org
Sat Dec 1 17:59:42 UTC 2018
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;
More information about the svn-src-all
mailing list