ipsec_encap: setdf is only used for INET.

This commit is contained in:
John Baldwin 2022-04-13 16:08:21 -07:00
parent f328c46fdd
commit 4046178557

View File

@ -1082,7 +1082,9 @@ ipsec_encap(struct mbuf **mp, struct secasindex *saidx)
struct ip6_hdr *ip6;
#endif
struct ip *ip;
#ifdef INET
int setdf;
#endif
uint8_t itos, proto;
ip = mtod(*mp, struct ip *);
@ -1110,7 +1112,6 @@ ipsec_encap(struct mbuf **mp, struct secasindex *saidx)
proto = IPPROTO_IPV6;
ip6 = mtod(*mp, struct ip6_hdr *);
itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
setdf = V_ip4_ipsec_dfbit ? 1: 0;
/* scoped address handling */
in6_clearscope(&ip6->ip6_src);
in6_clearscope(&ip6->ip6_dst);