| version 1.41.2.4, 2002/09/06 08:49:32 |
version 1.41.2.5, 2002/10/10 18:44:18 |
| Line 811 ip6_hopopts_input(plenp, rtalertp, mp, o |
|
| Line 811 ip6_hopopts_input(plenp, rtalertp, mp, o |
|
| |
|
| if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh), |
if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh), |
| hbhlen, rtalertp, plenp) < 0) |
hbhlen, rtalertp, plenp) < 0) |
| return(-1); |
return (-1); |
| |
|
| *offp = off; |
*offp = off; |
| *mp = m; |
*mp = m; |
| return(0); |
return (0); |
| } |
} |
| |
|
| /* |
/* |
| Line 975 ip6_unknown_opt(optp, m, off) |
|
| Line 975 ip6_unknown_opt(optp, m, off) |
|
| |
|
| switch (IP6OPT_TYPE(*optp)) { |
switch (IP6OPT_TYPE(*optp)) { |
| case IP6OPT_TYPE_SKIP: /* ignore the option */ |
case IP6OPT_TYPE_SKIP: /* ignore the option */ |
| return((int)*(optp + 1)); |
return ((int)*(optp + 1)); |
| case IP6OPT_TYPE_DISCARD: /* silently discard */ |
case IP6OPT_TYPE_DISCARD: /* silently discard */ |
| m_freem(m); |
m_freem(m); |
| return(-1); |
return (-1); |
| case IP6OPT_TYPE_FORCEICMP: /* send ICMP even if multicasted */ |
case IP6OPT_TYPE_FORCEICMP: /* send ICMP even if multicasted */ |
| ip6stat.ip6s_badoptions++; |
ip6stat.ip6s_badoptions++; |
| icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_OPTION, off); |
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_OPTION, off); |
| return(-1); |
return (-1); |
| case IP6OPT_TYPE_ICMP: /* send ICMP if not multicasted */ |
case IP6OPT_TYPE_ICMP: /* send ICMP if not multicasted */ |
| ip6stat.ip6s_badoptions++; |
ip6stat.ip6s_badoptions++; |
| ip6 = mtod(m, struct ip6_hdr *); |
ip6 = mtod(m, struct ip6_hdr *); |
| Line 992 ip6_unknown_opt(optp, m, off) |
|
| Line 992 ip6_unknown_opt(optp, m, off) |
|
| else |
else |
| icmp6_error(m, ICMP6_PARAM_PROB, |
icmp6_error(m, ICMP6_PARAM_PROB, |
| ICMP6_PARAMPROB_OPTION, off); |
ICMP6_PARAMPROB_OPTION, off); |
| return(-1); |
return (-1); |
| } |
} |
| |
|
| m_freem(m); /* XXX: NOTREACHED */ |
m_freem(m); /* XXX: NOTREACHED */ |
| return(-1); |
return (-1); |
| } |
} |
| |
|
| /* |
/* |
| Line 1243 ip6_savecontrol(in6p, mp, ip6, m) |
|
| Line 1243 ip6_savecontrol(in6p, mp, ip6, m) |
|
| * carefully. Moreover, it will not be used in the near future when |
* carefully. Moreover, it will not be used in the near future when |
| * we develop `neater' mechanism to process extension headers. |
* we develop `neater' mechanism to process extension headers. |
| */ |
*/ |
| char * |
u_int8_t * |
| ip6_get_prevhdr(m, off) |
ip6_get_prevhdr(m, off) |
| struct mbuf *m; |
struct mbuf *m; |
| int off; |
int off; |
| Line 1251 ip6_get_prevhdr(m, off) |
|
| Line 1251 ip6_get_prevhdr(m, off) |
|
| struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); |
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); |
| |
|
| if (off == sizeof(struct ip6_hdr)) |
if (off == sizeof(struct ip6_hdr)) |
| return(&ip6->ip6_nxt); |
return (&ip6->ip6_nxt); |
| else { |
else { |
| int len, nxt; |
int len, nxt; |
| struct ip6_ext *ip6e = NULL; |
struct ip6_ext *ip6e = NULL; |
| Line 1275 ip6_get_prevhdr(m, off) |
|
| Line 1275 ip6_get_prevhdr(m, off) |
|
| nxt = ip6e->ip6e_nxt; |
nxt = ip6e->ip6e_nxt; |
| } |
} |
| if (ip6e) |
if (ip6e) |
| return(&ip6e->ip6e_nxt); |
return (&ip6e->ip6e_nxt); |
| else |
else |
| return NULL; |
return NULL; |
| } |
} |
| Line 1359 ip6_nexthdr(m, off, proto, nxtp) |
|
| Line 1359 ip6_nexthdr(m, off, proto, nxtp) |
|
| default: |
default: |
| return -1; |
return -1; |
| } |
} |
| |
|
| return -1; |
|
| } |
} |
| |
|
| /* |
/* |