Date: Wed, 18 Oct 2000 19:31:09 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Darren Reed <darrenr@FreeBSD.org> Cc: net@FreeBSD.org Subject: IP Filter: small patch for FreeBSD re: ip_id Message-ID: <20001018193109.A78734@sunbay.com>
next in thread | raw e-mail | index | archive | help
--9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Darren and -net! As you probably know, recent versions of FreeBSD do not byte-swap the ip_id IP header field from network to host byte order anymore. When I did that change, I have looked at what NetBSD has already done (I am talking about the IP Filter part re: the ip_id here), and just imported their patches (since I am not running the IPF personally and could not test). Today I was reviewing my modifications, and have found (I think) the place where the byte-swapping of ip_id became now in error. Can you please review the attached (tiny) patch? <PS> If you find this change right, please forward it to NetBSD as well. </PS> Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: fil.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/fil.c,v retrieving revision 1.19 diff -u -p -r1.19 fil.c --- fil.c 2000/08/13 04:31:05 1.19 +++ fil.c 2000/10/18 16:08:57 @@ -825,12 +825,14 @@ int out; # endif #endif /* _KERNEL */ +#ifndef __FreeBSD__ /* * Be careful here: ip_id is in network byte order when called * from ip_output() */ if ((out) && (v == 4)) ip->ip_id = ntohs(ip->ip_id); +#endif changed = 0; fin->fin_v = v; @@ -1037,8 +1039,10 @@ logit: } #endif /* IPFILTER_LOG */ +#ifndef __FreeBSD__ if ((out) && (v == 4)) ip->ip_id = htons(ip->ip_id); +#endif #ifdef _KERNEL /* --9amGYk9869ThD9tj-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001018193109.A78734>