Date: Wed, 20 Jan 2016 07:50:39 +0000 (UTC) From: Kevin Lo <kevlo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r406733 - head/net/igmpproxy/files Message-ID: <201601200750.u0K7od3n024610@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevlo Date: Wed Jan 20 07:50:39 2016 New Revision: 406733 URL: https://svnweb.freebsd.org/changeset/ports/406733 Log: FreeBSD -CURRENT expects ip_len in network order. Modified: head/net/igmpproxy/files/patch-src__os-freebsd.h Modified: head/net/igmpproxy/files/patch-src__os-freebsd.h ============================================================================== --- head/net/igmpproxy/files/patch-src__os-freebsd.h Wed Jan 20 06:50:52 2016 (r406732) +++ head/net/igmpproxy/files/patch-src__os-freebsd.h Wed Jan 20 07:50:39 2016 (r406733) @@ -1,10 +1,12 @@ ---- src/os-freebsd.h.orig 2014-10-11 14:15:20 UTC -+++ src/os-freebsd.h -@@ -14,7 +14,11 @@ +--- src/os-freebsd.h.orig 2009-10-06 02:07:06.000000000 +0800 ++++ src/os-freebsd.h 2016-01-20 15:43:54.364740000 +0800 +@@ -14,10 +14,20 @@ static inline u_short ip_data_len(const struct ip *ip) { -+#if __FreeBSD_version >= 900044 ++#if __FreeBSD_version >= 1100030 ++ return ntohs(ip->ip_len) - (ip->ip_hl << 2); ++#elif __FreeBSD_version >= 900044 + return ip->ip_len - (ip->ip_hl << 2); +#else return ip->ip_len; @@ -12,3 +14,10 @@ } static inline void ip_set_len(struct ip *ip, u_short len) + { ++#if __FreeBSD_version >= 1100030 ++ ip->ip_len = htons(len); ++#else + ip->ip_len = len; ++#endif + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601200750.u0K7od3n024610>