svn commit: r342922 - head/sys/contrib/ipfilter/netinet

Gleb Smirnoff glebius at FreeBSD.org
Thu Jan 10 23:27:30 UTC 2019


Author: glebius
Date: Thu Jan 10 23:27:29 2019
New Revision: 342922
URL: https://svnweb.freebsd.org/changeset/base/342922

Log:
  Remove support for FreeBSD 9 kernel, which used to change byte order
  of packet headers.

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	Thu Jan 10 17:42:45 2019	(r342921)
+++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c	Thu Jan 10 23:27:29 2019	(r342922)
@@ -132,24 +132,10 @@ ipf_check_wrapper(void *arg, struct mbuf **mp, struct 
 	struct ip *ip = mtod(*mp, struct ip *);
 	int rv;
 
-	/*
-	 * IPFilter expects evreything in network byte order
-	 */
-#if (__FreeBSD_version < 1000019)
-	ip->ip_len = htons(ip->ip_len);
-	ip->ip_off = htons(ip->ip_off);
-#endif
 	CURVNET_SET(ifp->if_vnet);
 	rv = ipf_check(&V_ipfmain, ip, ip->ip_hl << 2, ifp, (dir == PFIL_OUT),
 		       mp);
 	CURVNET_RESTORE();
-#if (__FreeBSD_version < 1000019)
-	if ((rv == 0) && (*mp != NULL)) {
-		ip = mtod(*mp, struct ip *);
-		ip->ip_len = ntohs(ip->ip_len);
-		ip->ip_off = ntohs(ip->ip_off);
-	}
-#endif
 	return rv;
 }
 


More information about the svn-src-all mailing list