Fix handling of net.inet.ipsec.dfbit=2 variable.
IP_DF macro is in host bytes order, but ip_off field is in network bytes order. So, use htons() for correct check.
This commit is contained in:
parent
efdd41da26
commit
6f814d0ec1
@ -441,7 +441,7 @@ ipsec_encap(struct mbuf **mp, struct secasindex *saidx)
|
||||
setdf = V_ip4_ipsec_dfbit;
|
||||
break;
|
||||
default:/* propagate to outer header */
|
||||
setdf = (ip->ip_off & ntohs(IP_DF)) != 0;
|
||||
setdf = (ip->ip_off & htons(IP_DF)) != 0;
|
||||
}
|
||||
itos = ip->ip_tos;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user