Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/sctp6_usrreq.c
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | case ICMP6_PACKET_TOO_BIG: | ||||
break; | break; | ||||
default: | default: | ||||
SCTP_TCB_UNLOCK(stcb); | SCTP_TCB_UNLOCK(stcb); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
void | void | ||||
sctp6_ctlinput(int cmd, struct sockaddr *pktdst, void *d) | sctp6_ctlinput(int cmd, struct sockaddr_in6 *pktdst, struct ip6ctlparam *ip6cp) | ||||
{ | { | ||||
struct ip6ctlparam *ip6cp; | |||||
struct sctp_inpcb *inp; | struct sctp_inpcb *inp; | ||||
struct sctp_tcb *stcb; | struct sctp_tcb *stcb; | ||||
struct sctp_nets *net; | struct sctp_nets *net; | ||||
struct sctphdr sh; | struct sctphdr sh; | ||||
struct sockaddr_in6 src, dst; | struct sockaddr_in6 src, dst; | ||||
if (pktdst->sa_family != AF_INET6 || | |||||
pktdst->sa_len != sizeof(struct sockaddr_in6)) { | |||||
return; | |||||
} | |||||
if ((unsigned)cmd >= PRC_NCMDS) { | if ((unsigned)cmd >= PRC_NCMDS) { | ||||
return; | return; | ||||
} | } | ||||
if (PRC_IS_REDIRECT(cmd)) { | if (PRC_IS_REDIRECT(cmd)) { | ||||
d = NULL; | ip6cp = NULL; | ||||
} else if (inet6ctlerrmap[cmd] == 0) { | } else if (inet6ctlerrmap[cmd] == 0) { | ||||
return; | return; | ||||
} | |||||
/* If the parameter is from icmp6, decode it. */ | |||||
if (d != NULL) { | |||||
ip6cp = (struct ip6ctlparam *)d; | |||||
} else { | |||||
ip6cp = (struct ip6ctlparam *)NULL; | |||||
} | } | ||||
if (ip6cp != NULL) { | if (ip6cp != NULL) { | ||||
/* | /* | ||||
* XXX: We assume that when IPV6 is non NULL, M and OFF are | * XXX: We assume that when IPV6 is non NULL, M and OFF are | ||||
* valid. | * valid. | ||||
*/ | */ | ||||
if (ip6cp->ip6c_m == NULL) { | if (ip6cp->ip6c_m == NULL) { | ||||
▲ Show 20 Lines • Show All 950 Lines • Show Last 20 Lines |