Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_output.c
Show All 32 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_ipsec.h" | #include "opt_ipsec.h" | ||||
#include "opt_kern_tls.h" | #include "opt_kern_tls.h" | ||||
#include "opt_mbuf_stress_test.h" | #include "opt_mbuf_stress_test.h" | ||||
#include "opt_mpath.h" | |||||
#include "opt_ratelimit.h" | #include "opt_ratelimit.h" | ||||
#include "opt_route.h" | #include "opt_route.h" | ||||
#include "opt_rss.h" | #include "opt_rss.h" | ||||
#include "opt_sctp.h" | #include "opt_sctp.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
▲ Show 20 Lines • Show All 415 Lines • ▼ Show 20 Lines | again: | ||||
} else if (ro != NULL) { | } else if (ro != NULL) { | ||||
if (ro->ro_nh == NULL) { | if (ro->ro_nh == NULL) { | ||||
/* | /* | ||||
* We want to do any cloning requested by the link | * We want to do any cloning requested by the link | ||||
* layer, as this is probably required in all cases | * layer, as this is probably required in all cases | ||||
* for correct operation (as it is for ARP). | * for correct operation (as it is for ARP). | ||||
*/ | */ | ||||
uint32_t flowid; | uint32_t flowid; | ||||
#ifdef RADIX_MPATH | //flowid = ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr); | ||||
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(fibnum, dst->sin_addr, 0, | ro->ro_nh = fib4_lookup(fibnum, dst->sin_addr, 0, | ||||
NHR_REF, flowid); | NHR_REF, flowid); | ||||
if (ro->ro_nh == NULL || (!NH_IS_VALID(ro->ro_nh))) { | if (ro->ro_nh == NULL || (!NH_IS_VALID(ro->ro_nh))) { | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) | #if defined(IPSEC) || defined(IPSEC_SUPPORT) | ||||
/* | /* | ||||
* There is no route for this packet, but it is | * There is no route for this packet, but it is | ||||
* possible that a matching SPD entry exists. | * possible that a matching SPD entry exists. | ||||
Show All 21 Lines | #endif | ||||
if (ro->ro_nh->nh_flags & NHF_HOST) | if (ro->ro_nh->nh_flags & NHF_HOST) | ||||
mtu = ro->ro_nh->nh_mtu; | mtu = ro->ro_nh->nh_mtu; | ||||
else | else | ||||
mtu = ifp->if_mtu; | mtu = ifp->if_mtu; | ||||
src = IA_SIN(ia)->sin_addr; | src = IA_SIN(ia)->sin_addr; | ||||
} else { | } else { | ||||
struct nhop_object *nh; | struct nhop_object *nh; | ||||
nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_NONE, 0); | nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_NONE, | ||||
m->m_pkthdr.flowid); | |||||
if (nh == NULL) { | if (nh == NULL) { | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) | #if defined(IPSEC) || defined(IPSEC_SUPPORT) | ||||
/* | /* | ||||
* There is no route for this packet, but it is | * There is no route for this packet, but it is | ||||
* possible that a matching SPD entry exists. | * possible that a matching SPD entry exists. | ||||
*/ | */ | ||||
no_route_but_check_spd = 1; | no_route_but_check_spd = 1; | ||||
goto sendit; | goto sendit; | ||||
▲ Show 20 Lines • Show All 1,068 Lines • Show Last 20 Lines |