Date: Thu, 25 Aug 2011 09:38:33 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r225171 - head/sys/contrib/pf/net Message-ID: <201108250938.p7P9cXb7096414@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Thu Aug 25 09:38:33 2011 New Revision: 225171 URL: http://svn.freebsd.org/changeset/base/225171 Log: Use the correct byte order for the ip_divert(4) mbuf tag port meta information in pf(4). Submitted by: Yaocl (chunlinyao gmail.com), forum post 145106 Approved by: re (kib) Modified: head/sys/contrib/pf/net/pf.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Thu Aug 25 09:29:28 2011 (r225170) +++ head/sys/contrib/pf/net/pf.c Thu Aug 25 09:38:33 2011 (r225171) @@ -6967,7 +6967,8 @@ done: ipfwtag = m_tag_alloc(MTAG_IPFW_RULE, 0, sizeof(struct ipfw_rule_ref), M_NOWAIT | M_ZERO); if (ipfwtag != NULL) { - ((struct ipfw_rule_ref *)(ipfwtag+1))->info = r->divert.port; + ((struct ipfw_rule_ref *)(ipfwtag+1))->info = + ntohs(r->divert.port); ((struct ipfw_rule_ref *)(ipfwtag+1))->rulenum = dir; m_tag_prepend(m, ipfwtag);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108250938.p7P9cXb7096414>