Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/ip_output.c
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | again: | ||||
* Also check whether routing cache needs invalidation. | * Also check whether routing cache needs invalidation. | ||||
*/ | */ | ||||
rte = ro->ro_rt; | rte = ro->ro_rt; | ||||
if (rte && ((rte->rt_flags & RTF_UP) == 0 || | if (rte && ((rte->rt_flags & RTF_UP) == 0 || | ||||
rte->rt_ifp == NULL || | rte->rt_ifp == NULL || | ||||
!RT_LINK_IS_UP(rte->rt_ifp) || | !RT_LINK_IS_UP(rte->rt_ifp) || | ||||
dst->sin_family != AF_INET || | dst->sin_family != AF_INET || | ||||
dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { | dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { | ||||
RTFREE(rte); | RO_INVALIDATE_CACHE(ro); | ||||
rte = ro->ro_rt = (struct rtentry *)NULL; | rte = NULL; | ||||
if (ro->ro_lle) | |||||
LLE_FREE(ro->ro_lle); /* zeros ro_lle */ | |||||
ro->ro_lle = (struct llentry *)NULL; | |||||
} | } | ||||
ia = NULL; | ia = NULL; | ||||
have_ia_ref = 0; | have_ia_ref = 0; | ||||
/* | /* | ||||
* If routing to interface only, short circuit routing lookup. | * If routing to interface only, short circuit routing lookup. | ||||
* The use of an all-ones broadcast address implies this; an | * The use of an all-ones broadcast address implies this; an | ||||
* interface is specified by the broadcast address of an interface, | * interface is specified by the broadcast address of an interface, | ||||
* or the destination address of a ptp interface. | * or the destination address of a ptp interface. | ||||
▲ Show 20 Lines • Show All 1,121 Lines • Show Last 20 Lines |