Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_input.c
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | sysctl_netinet6_intr_queue_maxlen(SYSCTL_HANDLER_ARGS) | ||||
return (netisr_setqlimit(&ip6_nh, qlimit)); | return (netisr_setqlimit(&ip6_nh, qlimit)); | ||||
} | } | ||||
SYSCTL_DECL(_net_inet6_ip6); | SYSCTL_DECL(_net_inet6_ip6); | ||||
SYSCTL_PROC(_net_inet6_ip6, IPV6CTL_INTRQMAXLEN, intr_queue_maxlen, | SYSCTL_PROC(_net_inet6_ip6, IPV6CTL_INTRQMAXLEN, intr_queue_maxlen, | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, | ||||
0, 0, sysctl_netinet6_intr_queue_maxlen, "I", | 0, 0, sysctl_netinet6_intr_queue_maxlen, "I", | ||||
"Maximum size of the IPv6 input queue"); | "Maximum size of the IPv6 input queue"); | ||||
VNET_DEFINE_STATIC(bool, ip6_sav) = true; | |||||
#define V_ip6_sav VNET(ip6_sav) | |||||
SYSCTL_BOOL(_net_inet6_ip6, OID_AUTO, source_address_validation, | |||||
CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_sav), true, | |||||
"Drop incoming packets with source address that is a local address"); | |||||
#ifdef RSS | #ifdef RSS | ||||
static struct netisr_handler ip6_direct_nh = { | static struct netisr_handler ip6_direct_nh = { | ||||
.nh_name = "ip6_direct", | .nh_name = "ip6_direct", | ||||
.nh_handler = ip6_direct_input, | .nh_handler = ip6_direct_input, | ||||
.nh_proto = NETISR_IPV6_DIRECT, | .nh_proto = NETISR_IPV6_DIRECT, | ||||
.nh_m2cpuid = rss_soft_m2cpuid_v6, | .nh_m2cpuid = rss_soft_m2cpuid_v6, | ||||
.nh_policy = NETISR_POLICY_CPU, | .nh_policy = NETISR_POLICY_CPU, | ||||
.nh_dispatch = NETISR_DISPATCH_HYBRID, | .nh_dispatch = NETISR_DISPATCH_HYBRID, | ||||
▲ Show 20 Lines • Show All 635 Lines • ▼ Show 20 Lines | if (ia != NULL) { | ||||
if (ia->ia6_flags & IN6_IFF_NOTREADY) { | if (ia->ia6_flags & IN6_IFF_NOTREADY) { | ||||
char ip6bufs[INET6_ADDRSTRLEN]; | char ip6bufs[INET6_ADDRSTRLEN]; | ||||
char ip6bufd[INET6_ADDRSTRLEN]; | char ip6bufd[INET6_ADDRSTRLEN]; | ||||
/* address is not ready, so discard the packet. */ | /* address is not ready, so discard the packet. */ | ||||
nd6log((LOG_INFO, | nd6log((LOG_INFO, | ||||
"ip6_input: packet to an unready address %s->%s\n", | "ip6_input: packet to an unready address %s->%s\n", | ||||
ip6_sprintf(ip6bufs, &ip6->ip6_src), | ip6_sprintf(ip6bufs, &ip6->ip6_src), | ||||
ip6_sprintf(ip6bufd, &ip6->ip6_dst))); | ip6_sprintf(ip6bufd, &ip6->ip6_dst))); | ||||
goto bad; | |||||
} | |||||
if (V_ip6_sav && !(rcvif->if_flags & IFF_LOOPBACK) && | |||||
__predict_false(in6_localip_fib(&ip6->ip6_src, | |||||
melifaro: How will it work with multiple fibs? | |||||
Done Inline Actionsglebius: We chatted with Alexander on what kind of a setup could be broken by restriction that the… | |||||
rcvif->if_fib))) { | |||||
IP6STAT_INC(ip6s_badscope); /* XXX */ | |||||
goto bad; | goto bad; | ||||
} | } | ||||
/* Count the packet in the ip address stats */ | /* Count the packet in the ip address stats */ | ||||
counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); | counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); | ||||
counter_u64_add(ia->ia_ifa.ifa_ibytes, m->m_pkthdr.len); | counter_u64_add(ia->ia_ifa.ifa_ibytes, m->m_pkthdr.len); | ||||
ours = 1; | ours = 1; | ||||
goto hbhcheck; | goto hbhcheck; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 912 Lines • Show Last 20 Lines |
How will it work with multiple fibs?