aboutsummaryrefslogtreecommitdiff
path: root/sys/netipsec
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-13 23:08:21 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-04-13 23:08:21 +0000
commit4046178557e1e78ff830c2cfb17e10627ccecd37 (patch)
tree307f351f54685c55334204cbf833e860a16a4ce7 /sys/netipsec
parentf328c46fddea172ffe3dfce1921917151c84f30f (diff)
downloadsrc-4046178557e1e78ff830c2cfb17e10627ccecd37.tar.gz
src-4046178557e1e78ff830c2cfb17e10627ccecd37.zip
ipsec_encap: setdf is only used for INET.
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/ipsec_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index b0298f8145d4..26588db6371b 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -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);