Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/sctp_output.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3,381 Lines • ▼ Show 20 Lines | #endif | ||||
* or G. We should prefer G -> G and P -> P if possible. | * or G. We should prefer G -> G and P -> P if possible. | ||||
* Then as a secondary fall back to mixed types G->P being a last | * Then as a secondary fall back to mixed types G->P being a last | ||||
* ditch one. | * ditch one. | ||||
* - The above all works for bound all, but bound specific we need to | * - The above all works for bound all, but bound specific we need to | ||||
* use the same concept but instead only consider the bound | * use the same concept but instead only consider the bound | ||||
* addresses. If the bound set is NOT assigned to the interface then | * addresses. If the bound set is NOT assigned to the interface then | ||||
* we must use rotation amongst the bound addresses.. | * we must use rotation amongst the bound addresses.. | ||||
*/ | */ | ||||
if (ro->ro_rt == NULL) { | if (ro->ro_nh == NULL) { | ||||
/* | /* | ||||
* Need a route to cache. | * Need a route to cache. | ||||
*/ | */ | ||||
SCTP_RTALLOC(ro, vrf_id, inp->fibnum); | SCTP_RTALLOC(ro, vrf_id, inp->fibnum); | ||||
} | } | ||||
if (ro->ro_rt == NULL) { | if (ro->ro_nh == NULL) { | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
fam = ro->ro_dst.sa_family; | fam = ro->ro_dst.sa_family; | ||||
dest_is_priv = dest_is_loop = 0; | dest_is_priv = dest_is_loop = 0; | ||||
/* Setup our scopes for the destination */ | /* Setup our scopes for the destination */ | ||||
switch (fam) { | switch (fam) { | ||||
#ifdef INET | #ifdef INET | ||||
case AF_INET: | case AF_INET: | ||||
▲ Show 20 Lines • Show All 721 Lines • ▼ Show 20 Lines | case AF_INET: | ||||
ip->ip_dst.s_addr = ((struct sockaddr_in *)to)->sin_addr.s_addr; | ip->ip_dst.s_addr = ((struct sockaddr_in *)to)->sin_addr.s_addr; | ||||
/* call the routine to select the src address */ | /* call the routine to select the src address */ | ||||
if (net && out_of_asoc_ok == 0) { | if (net && out_of_asoc_ok == 0) { | ||||
if (net->ro._s_addr && (net->ro._s_addr->localifa_flags & (SCTP_BEING_DELETED | SCTP_ADDR_IFA_UNUSEABLE))) { | if (net->ro._s_addr && (net->ro._s_addr->localifa_flags & (SCTP_BEING_DELETED | SCTP_ADDR_IFA_UNUSEABLE))) { | ||||
sctp_free_ifa(net->ro._s_addr); | sctp_free_ifa(net->ro._s_addr); | ||||
net->ro._s_addr = NULL; | net->ro._s_addr = NULL; | ||||
net->src_addr_selected = 0; | net->src_addr_selected = 0; | ||||
if (ro->ro_rt) { | RO_NHFREE(ro); | ||||
RTFREE(ro->ro_rt); | |||||
ro->ro_rt = NULL; | |||||
} | } | ||||
} | |||||
if (net->src_addr_selected == 0) { | if (net->src_addr_selected == 0) { | ||||
/* Cache the source address */ | /* Cache the source address */ | ||||
net->ro._s_addr = sctp_source_address_selection(inp, stcb, | net->ro._s_addr = sctp_source_address_selection(inp, stcb, | ||||
ro, net, 0, | ro, net, 0, | ||||
vrf_id); | vrf_id); | ||||
net->src_addr_selected = 1; | net->src_addr_selected = 1; | ||||
} | } | ||||
if (net->ro._s_addr == NULL) { | if (net->ro._s_addr == NULL) { | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | case AF_INET: | ||||
/* | /* | ||||
* If source address selection fails and we find no | * If source address selection fails and we find no | ||||
* route then the ip_output should fail as well with | * route then the ip_output should fail as well with | ||||
* a NO_ROUTE_TO_HOST type error. We probably should | * a NO_ROUTE_TO_HOST type error. We probably should | ||||
* catch that somewhere and abort the association | * catch that somewhere and abort the association | ||||
* right away (assuming this is an INIT being sent). | * right away (assuming this is an INIT being sent). | ||||
*/ | */ | ||||
if (ro->ro_rt == NULL) { | if (ro->ro_nh == NULL) { | ||||
/* | /* | ||||
* src addr selection failed to find a route | * src addr selection failed to find a route | ||||
* (or valid source addr), so we can't get | * (or valid source addr), so we can't get | ||||
* there from here (yet)! | * there from here (yet)! | ||||
*/ | */ | ||||
sctp_handle_no_route(stcb, net, so_locked); | sctp_handle_no_route(stcb, net, so_locked); | ||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); | SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); | ||||
sctp_m_freem(m); | sctp_m_freem(m); | ||||
return (EHOSTUNREACH); | return (EHOSTUNREACH); | ||||
} | } | ||||
if (ro != &iproute) { | if (ro != &iproute) { | ||||
memcpy(&iproute, ro, sizeof(*ro)); | memcpy(&iproute, ro, sizeof(*ro)); | ||||
} | } | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT3, "Calling ipv4 output routine from low level src addr:%x\n", | SCTPDBG(SCTP_DEBUG_OUTPUT3, "Calling ipv4 output routine from low level src addr:%x\n", | ||||
(uint32_t)(ntohl(ip->ip_src.s_addr))); | (uint32_t)(ntohl(ip->ip_src.s_addr))); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT3, "Destination is %x\n", | SCTPDBG(SCTP_DEBUG_OUTPUT3, "Destination is %x\n", | ||||
(uint32_t)(ntohl(ip->ip_dst.s_addr))); | (uint32_t)(ntohl(ip->ip_dst.s_addr))); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT3, "RTP route is %p through\n", | SCTPDBG(SCTP_DEBUG_OUTPUT3, "RTP route is %p through\n", | ||||
(void *)ro->ro_rt); | (void *)ro->ro_nh); | ||||
if (SCTP_GET_HEADER_FOR_OUTPUT(o_pak)) { | if (SCTP_GET_HEADER_FOR_OUTPUT(o_pak)) { | ||||
/* failed to prepend data, give up */ | /* failed to prepend data, give up */ | ||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); | SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); | ||||
sctp_m_freem(m); | sctp_m_freem(m); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
SCTP_ATTACH_CHAIN(o_pak, m, packet_length); | SCTP_ATTACH_CHAIN(o_pak, m, packet_length); | ||||
Show All 36 Lines | #endif | ||||
SCTP_STAT_INCR(sctps_sendpackets); | SCTP_STAT_INCR(sctps_sendpackets); | ||||
SCTP_STAT_INCR_COUNTER64(sctps_outpackets); | SCTP_STAT_INCR_COUNTER64(sctps_outpackets); | ||||
if (ret) | if (ret) | ||||
SCTP_STAT_INCR(sctps_senderrors); | SCTP_STAT_INCR(sctps_senderrors); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT3, "IP output returns %d\n", ret); | SCTPDBG(SCTP_DEBUG_OUTPUT3, "IP output returns %d\n", ret); | ||||
if (net == NULL) { | if (net == NULL) { | ||||
/* free tempy routes */ | /* free tempy routes */ | ||||
RO_RTFREE(ro); | RO_NHFREE(ro); | ||||
} else { | } else { | ||||
if ((ro->ro_rt != NULL) && (net->ro._s_addr) && | if ((ro->ro_nh != NULL) && (net->ro._s_addr) && | ||||
((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { | ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { | ||||
uint32_t mtu; | uint32_t mtu; | ||||
mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_rt); | mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_nh); | ||||
if (mtu > 0) { | if (mtu > 0) { | ||||
if (net->port) { | if (net->port) { | ||||
mtu -= sizeof(struct udphdr); | mtu -= sizeof(struct udphdr); | ||||
} | } | ||||
if (mtu < net->mtu) { | if (mtu < net->mtu) { | ||||
if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { | if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { | ||||
sctp_mtu_size_reset(inp, &stcb->asoc, mtu); | sctp_mtu_size_reset(inp, &stcb->asoc, mtu); | ||||
} | } | ||||
net->mtu = mtu; | net->mtu = mtu; | ||||
} | } | ||||
} | } | ||||
} else if (ro->ro_rt == NULL) { | } else if (ro->ro_nh == NULL) { | ||||
/* route was freed */ | /* route was freed */ | ||||
if (net->ro._s_addr && | if (net->ro._s_addr && | ||||
net->src_addr_selected) { | net->src_addr_selected) { | ||||
sctp_free_ifa(net->ro._s_addr); | sctp_free_ifa(net->ro._s_addr); | ||||
net->ro._s_addr = NULL; | net->ro._s_addr = NULL; | ||||
} | } | ||||
net->src_addr_selected = 0; | net->src_addr_selected = 0; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | case AF_INET6: | ||||
lsa6_tmp.sin6_family = AF_INET6; | lsa6_tmp.sin6_family = AF_INET6; | ||||
lsa6_tmp.sin6_len = sizeof(lsa6_tmp); | lsa6_tmp.sin6_len = sizeof(lsa6_tmp); | ||||
lsa6 = &lsa6_tmp; | lsa6 = &lsa6_tmp; | ||||
if (net && out_of_asoc_ok == 0) { | if (net && out_of_asoc_ok == 0) { | ||||
if (net->ro._s_addr && (net->ro._s_addr->localifa_flags & (SCTP_BEING_DELETED | SCTP_ADDR_IFA_UNUSEABLE))) { | if (net->ro._s_addr && (net->ro._s_addr->localifa_flags & (SCTP_BEING_DELETED | SCTP_ADDR_IFA_UNUSEABLE))) { | ||||
sctp_free_ifa(net->ro._s_addr); | sctp_free_ifa(net->ro._s_addr); | ||||
net->ro._s_addr = NULL; | net->ro._s_addr = NULL; | ||||
net->src_addr_selected = 0; | net->src_addr_selected = 0; | ||||
if (ro->ro_rt) { | RO_NHFREE(ro); | ||||
RTFREE(ro->ro_rt); | |||||
ro->ro_rt = NULL; | |||||
} | } | ||||
} | |||||
if (net->src_addr_selected == 0) { | if (net->src_addr_selected == 0) { | ||||
sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; | sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; | ||||
/* KAME hack: embed scopeid */ | /* KAME hack: embed scopeid */ | ||||
if (sa6_embedscope(sin6, MODULE_GLOBAL(ip6_use_defzone)) != 0) { | if (sa6_embedscope(sin6, MODULE_GLOBAL(ip6_use_defzone)) != 0) { | ||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); | SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); | ||||
sctp_m_freem(m); | sctp_m_freem(m); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | case AF_INET6: | ||||
} else { | } else { | ||||
lsa6->sin6_addr = over_addr->sin6.sin6_addr; | lsa6->sin6_addr = over_addr->sin6.sin6_addr; | ||||
SCTP_RTALLOC(ro, vrf_id, inp->fibnum); | SCTP_RTALLOC(ro, vrf_id, inp->fibnum); | ||||
} | } | ||||
(void)sa6_recoverscope(sin6); | (void)sa6_recoverscope(sin6); | ||||
} | } | ||||
lsa6->sin6_port = inp->sctp_lport; | lsa6->sin6_port = inp->sctp_lport; | ||||
if (ro->ro_rt == NULL) { | if (ro->ro_nh == NULL) { | ||||
/* | /* | ||||
* src addr selection failed to find a route | * src addr selection failed to find a route | ||||
* (or valid source addr), so we can't get | * (or valid source addr), so we can't get | ||||
* there from here! | * there from here! | ||||
*/ | */ | ||||
sctp_handle_no_route(stcb, net, so_locked); | sctp_handle_no_route(stcb, net, so_locked); | ||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); | SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); | ||||
sctp_m_freem(m); | sctp_m_freem(m); | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
SCTP_STAT_INCR(sctps_sendpackets); | SCTP_STAT_INCR(sctps_sendpackets); | ||||
SCTP_STAT_INCR_COUNTER64(sctps_outpackets); | SCTP_STAT_INCR_COUNTER64(sctps_outpackets); | ||||
if (ret) { | if (ret) { | ||||
SCTP_STAT_INCR(sctps_senderrors); | SCTP_STAT_INCR(sctps_senderrors); | ||||
} | } | ||||
if (net == NULL) { | if (net == NULL) { | ||||
/* Now if we had a temp route free it */ | /* Now if we had a temp route free it */ | ||||
RO_RTFREE(ro); | RO_NHFREE(ro); | ||||
} else { | } else { | ||||
/* | /* | ||||
* PMTU check versus smallest asoc MTU goes | * PMTU check versus smallest asoc MTU goes | ||||
* here | * here | ||||
*/ | */ | ||||
if (ro->ro_rt == NULL) { | if (ro->ro_nh == NULL) { | ||||
/* Route was freed */ | /* Route was freed */ | ||||
if (net->ro._s_addr && | if (net->ro._s_addr && | ||||
net->src_addr_selected) { | net->src_addr_selected) { | ||||
sctp_free_ifa(net->ro._s_addr); | sctp_free_ifa(net->ro._s_addr); | ||||
net->ro._s_addr = NULL; | net->ro._s_addr = NULL; | ||||
} | } | ||||
net->src_addr_selected = 0; | net->src_addr_selected = 0; | ||||
} | } | ||||
if ((ro->ro_rt != NULL) && (net->ro._s_addr) && | if ((ro->ro_nh != NULL) && (net->ro._s_addr) && | ||||
((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { | ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { | ||||
uint32_t mtu; | uint32_t mtu; | ||||
mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_rt); | mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_nh); | ||||
if (mtu > 0) { | if (mtu > 0) { | ||||
if (net->port) { | if (net->port) { | ||||
mtu -= sizeof(struct udphdr); | mtu -= sizeof(struct udphdr); | ||||
} | } | ||||
if (mtu < net->mtu) { | if (mtu < net->mtu) { | ||||
if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { | if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) { | ||||
sctp_mtu_size_reset(inp, &stcb->asoc, mtu); | sctp_mtu_size_reset(inp, &stcb->asoc, mtu); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 9,177 Lines • ▼ Show 20 Lines | |||||
#ifdef INET6 | #ifdef INET6 | ||||
int | int | ||||
sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sctp_route_t *ro) | sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sctp_route_t *ro) | ||||
{ | { | ||||
struct nd_prefix *pfx = NULL; | struct nd_prefix *pfx = NULL; | ||||
struct nd_pfxrouter *pfxrtr = NULL; | struct nd_pfxrouter *pfxrtr = NULL; | ||||
struct sockaddr_in6 gw6; | struct sockaddr_in6 gw6; | ||||
if (ro == NULL || ro->ro_rt == NULL || src6->sin6_family != AF_INET6) | if (ro == NULL || ro->ro_nh == NULL || src6->sin6_family != AF_INET6) | ||||
return (0); | return (0); | ||||
/* get prefix entry of address */ | /* get prefix entry of address */ | ||||
ND6_RLOCK(); | ND6_RLOCK(); | ||||
LIST_FOREACH(pfx, &MODULE_GLOBAL(nd_prefix), ndpr_entry) { | LIST_FOREACH(pfx, &MODULE_GLOBAL(nd_prefix), ndpr_entry) { | ||||
if (pfx->ndpr_stateflags & NDPRF_DETACHED) | if (pfx->ndpr_stateflags & NDPRF_DETACHED) | ||||
continue; | continue; | ||||
if (IN6_ARE_MASKED_ADDR_EQUAL(&pfx->ndpr_prefix.sin6_addr, | if (IN6_ARE_MASKED_ADDR_EQUAL(&pfx->ndpr_prefix.sin6_addr, | ||||
Show All 16 Lines | LIST_FOREACH(pfxrtr, &pfx->ndpr_advrtrs, pfr_entry) { | ||||
memset(&gw6, 0, sizeof(struct sockaddr_in6)); | memset(&gw6, 0, sizeof(struct sockaddr_in6)); | ||||
gw6.sin6_family = AF_INET6; | gw6.sin6_family = AF_INET6; | ||||
gw6.sin6_len = sizeof(struct sockaddr_in6); | gw6.sin6_len = sizeof(struct sockaddr_in6); | ||||
memcpy(&gw6.sin6_addr, &pfxrtr->router->rtaddr, | memcpy(&gw6.sin6_addr, &pfxrtr->router->rtaddr, | ||||
sizeof(struct in6_addr)); | sizeof(struct in6_addr)); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT2, "prefix router is "); | SCTPDBG(SCTP_DEBUG_OUTPUT2, "prefix router is "); | ||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&gw6); | SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&gw6); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT2, "installed router is "); | SCTPDBG(SCTP_DEBUG_OUTPUT2, "installed router is "); | ||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, ro->ro_rt->rt_gateway); | SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &ro->ro_nh->gw_sa); | ||||
if (sctp_cmpaddr((struct sockaddr *)&gw6, ro->ro_rt->rt_gateway)) { | if (sctp_cmpaddr((struct sockaddr *)&gw6, &ro->ro_nh->gw_sa)) { | ||||
ND6_RUNLOCK(); | ND6_RUNLOCK(); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is installed\n"); | SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is installed\n"); | ||||
return (1); | return (1); | ||||
} | } | ||||
} | } | ||||
ND6_RUNLOCK(); | ND6_RUNLOCK(); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is not installed\n"); | SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is not installed\n"); | ||||
return (0); | return (0); | ||||
} | } | ||||
#endif | #endif | ||||
int | int | ||||
sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_route_t *ro) | sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_route_t *ro) | ||||
{ | { | ||||
#ifdef INET | #ifdef INET | ||||
struct sockaddr_in *sin, *mask; | struct sockaddr_in *sin, *mask; | ||||
struct ifaddr *ifa; | struct ifaddr *ifa; | ||||
struct in_addr srcnetaddr, gwnetaddr; | struct in_addr srcnetaddr, gwnetaddr; | ||||
if (ro == NULL || ro->ro_rt == NULL || | if (ro == NULL || ro->ro_nh == NULL || | ||||
sifa->address.sa.sa_family != AF_INET) { | sifa->address.sa.sa_family != AF_INET) { | ||||
return (0); | return (0); | ||||
} | } | ||||
ifa = (struct ifaddr *)sifa->ifa; | ifa = (struct ifaddr *)sifa->ifa; | ||||
mask = (struct sockaddr_in *)(ifa->ifa_netmask); | mask = (struct sockaddr_in *)(ifa->ifa_netmask); | ||||
sin = &sifa->address.sin; | sin = &sifa->address.sin; | ||||
srcnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); | srcnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: src address is "); | SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: src address is "); | ||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &sifa->address.sa); | SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &sifa->address.sa); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", srcnetaddr.s_addr); | SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", srcnetaddr.s_addr); | ||||
sin = (struct sockaddr_in *)ro->ro_rt->rt_gateway; | sin = &ro->ro_nh->gw4_sa; | ||||
gwnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); | gwnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: nexthop is "); | SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: nexthop is "); | ||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, ro->ro_rt->rt_gateway); | SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &ro->ro_nh->gw4_sa); | ||||
SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", gwnetaddr.s_addr); | SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", gwnetaddr.s_addr); | ||||
if (srcnetaddr.s_addr == gwnetaddr.s_addr) { | if (srcnetaddr.s_addr == gwnetaddr.s_addr) { | ||||
return (1); | return (1); | ||||
} | } | ||||
#endif | #endif | ||||
return (0); | return (0); | ||||
} | } |