Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jan 2019 23:27:29 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342922 - head/sys/contrib/ipfilter/netinet
Message-ID:  <201901102327.x0ANRThW027635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901102327.x0ANRThW027635>