minimize diff with the latest kame tree.
This commit is contained in:
parent
2f928e31d3
commit
8b3234d2f2
|
@ -1,4 +1,5 @@
|
|||
/* $NetBSD: dest6.c,v 1.7 2000/02/06 12:49:42 itojun Exp $ */
|
||||
/* $NetBSD: dest6.c,v 1.8 2001/01/23 05:21:23 itojun Exp $ */
|
||||
/* $KAME: dest6.c,v 1.14 2001/01/23 05:16:28 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -58,7 +59,7 @@ dest6_input(mp, offp, proto)
|
|||
struct mbuf **mp;
|
||||
int *offp, proto;
|
||||
{
|
||||
register struct mbuf *m = *mp;
|
||||
struct mbuf *m = *mp;
|
||||
int off = *offp, dstoptlen, optlen;
|
||||
struct ip6_dest *dstopts;
|
||||
u_int8_t *opt;
|
||||
|
@ -88,7 +89,7 @@ dest6_input(mp, offp, proto)
|
|||
|
||||
/* search header for all options. */
|
||||
for (optlen = 0; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) {
|
||||
switch(*opt) {
|
||||
switch (*opt) {
|
||||
case IP6OPT_PAD1:
|
||||
optlen = 1;
|
||||
break;
|
||||
|
@ -104,18 +105,19 @@ dest6_input(mp, offp, proto)
|
|||
ip6stat.ip6s_toosmall++;
|
||||
goto bad;
|
||||
}
|
||||
if ((optlen = ip6_unknown_opt(opt, m,
|
||||
opt-mtod(m, u_int8_t *))) == -1)
|
||||
return(IPPROTO_DONE);
|
||||
optlen = ip6_unknown_opt(opt, m,
|
||||
opt - mtod(m, u_int8_t *));
|
||||
if (optlen == -1)
|
||||
return (IPPROTO_DONE);
|
||||
optlen += 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*offp = off;
|
||||
return(dstopts->ip6d_nxt);
|
||||
return (dstopts->ip6d_nxt);
|
||||
|
||||
bad:
|
||||
m_freem(m);
|
||||
return(IPPROTO_DONE);
|
||||
return (IPPROTO_DONE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue