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)
This commit is contained in:
Bjoern A. Zeeb 2011-08-25 09:38:33 +00:00
parent b233773bb9
commit c5378361a3

View File

@ -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);