diff options
author | bz <bz@FreeBSD.org> | 2011-08-25 09:38:33 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2011-08-25 09:38:33 +0000 |
commit | e414ca1893163f229dda1e3e25d9b4ec53e4d7b2 (patch) | |
tree | 8e706ccd4ed3af7f59ce2c7d117db195f4498469 | |
parent | 860d2aa85df1d35491870df7bf0b51f97fe69848 (diff) | |
download | FreeBSD-src-e414ca1893163f229dda1e3e25d9b4ec53e4d7b2.zip FreeBSD-src-e414ca1893163f229dda1e3e25d9b4ec53e4d7b2.tar.gz |
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)
-rw-r--r-- | sys/contrib/pf/net/pf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c index 5efd651..9d40371 100644 --- a/sys/contrib/pf/net/pf.c +++ b/sys/contrib/pf/net/pf.c @@ -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); |