Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/ip_input.c
Show First 20 Lines • Show All 975 Lines • ▼ Show 20 Lines | #endif | ||||
return; | return; | ||||
} | } | ||||
bzero(&ro, sizeof(ro)); | bzero(&ro, sizeof(ro)); | ||||
sin = (struct sockaddr_in *)&ro.ro_dst; | sin = (struct sockaddr_in *)&ro.ro_dst; | ||||
sin->sin_family = AF_INET; | sin->sin_family = AF_INET; | ||||
sin->sin_len = sizeof(*sin); | sin->sin_len = sizeof(*sin); | ||||
sin->sin_addr = ip->ip_dst; | sin->sin_addr = ip->ip_dst; | ||||
#ifdef RADIX_MPATH | |||||
flowid = ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr); | |||||
#else | |||||
flowid = m->m_pkthdr.flowid; | flowid = m->m_pkthdr.flowid; | ||||
#endif | |||||
ro.ro_nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_REF, flowid); | ro.ro_nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_REF, flowid); | ||||
if (ro.ro_nh != NULL) { | if (ro.ro_nh != NULL) { | ||||
ia = ifatoia(ro.ro_nh->nh_ifa); | ia = ifatoia(ro.ro_nh->nh_ifa); | ||||
} else | } else | ||||
ia = NULL; | ia = NULL; | ||||
/* | /* | ||||
* Save the IP header and at most 8 bytes of the payload, | * Save the IP header and at most 8 bytes of the payload, | ||||
* in case we need to generate an ICMP message to the src. | * in case we need to generate an ICMP message to the src. | ||||
▲ Show 20 Lines • Show All 436 Lines • Show Last 20 Lines |