svn commit: r225171 - head/sys/contrib/pf/net
Bjoern A. Zeeb
bz at FreeBSD.org
Thu Aug 25 09:38:34 UTC 2011
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);
More information about the svn-src-head
mailing list