diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-12-02 12:39:16 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-12-02 12:39:16 +0000 |
commit | 50a2dcd14345dac2a5e224a856d00dd13be4f8aa (patch) | |
tree | 29d42c79760caaadb988f184f76009f5dac7c86c /sys/netinet/ipsec_input.c | |
parent | 953b5678cbcdd918247f379b24743bc3f759891c (diff) |
Allow to build kernel without IPSEC or INET6 defines.
OK mpi@ mvs@
Diffstat (limited to 'sys/netinet/ipsec_input.c')
-rw-r--r-- | sys/netinet/ipsec_input.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index eeb287e2641..df686c878c1 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.194 2021/12/01 12:51:09 bluhm Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.195 2021/12/02 12:39:15 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -1009,8 +1009,10 @@ esp4_ctlinput(int cmd, struct sockaddr *sa, u_int rdomain, void *v) int ipsec_protoff(struct mbuf *m, int off, int af) { +#ifdef INET6 struct ip6_ext ip6e; int protoff, nxt, l; +#endif /* INET6 */ switch (af) { case AF_INET: @@ -1018,11 +1020,12 @@ ipsec_protoff(struct mbuf *m, int off, int af) #ifdef INET6 case AF_INET6: break; -#endif +#endif /* INET6 */ default: unhandled_af(af); } +#ifdef INET6 if (off < sizeof(struct ip6_hdr)) return -1; @@ -1057,6 +1060,7 @@ ipsec_protoff(struct mbuf *m, int off, int af) protoff += offsetof(struct ip6_ext, ip6e_nxt); return protoff; +#endif /* INET6 */ } int |