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;
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to