Make kernels with IPSec but without IPv6 compile again.

This may break IPPROTO_AH - someone with a clue should double-check
this, please.
This commit is contained in:
martin 2000-09-25 12:35:53 +00:00
parent ccf1c822a6
commit 4e675359ad
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec.c,v 1.25 2000/09/22 05:49:46 itojun Exp $ */
/* $NetBSD: ipsec.c,v 1.26 2000/09/25 12:35:53 martin Exp $ */
/* $KAME: ipsec.c,v 1.78 2000/09/22 05:29:48 itojun Exp $ */
/*
@ -810,7 +810,9 @@ ipsec4_get_ulp(m, spidx, needport)
int needport;
{
struct ip ip;
#ifdef INET6
struct ip6_ext ip6e;
#endif
u_int8_t nxt;
int off;
struct tcphdr th;
@ -867,6 +869,7 @@ ipsec4_get_ulp(m, spidx, needport)
case IPPROTO_ICMP:
spidx->ul_proto = nxt;
return;
#ifdef INET6
case IPPROTO_AH:
if (m->m_pkthdr.len > off + sizeof(ip6e))
return;
@ -874,6 +877,7 @@ ipsec4_get_ulp(m, spidx, needport)
off += (ip6e.ip6e_len + 2) << 2;
nxt = ip6e.ip6e_nxt;
break;
#endif
/* XXX other headers to look at? */
default:
return;