Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/raw_ip.c
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
#include <netinet/ip_mroute.h> | #include <netinet/ip_mroute.h> | ||||
#include <netinet/ip_icmp.h> | #include <netinet/ip_icmp.h> | ||||
#include <netipsec/ipsec_support.h> | #include <netipsec/ipsec_support.h> | ||||
#include <machine/stdarg.h> | #include <machine/stdarg.h> | ||||
#include <security/mac/mac_framework.h> | #include <security/mac/mac_framework.h> | ||||
extern ipproto_input_t *ip_protox[]; | |||||
VNET_DEFINE(int, ip_defttl) = IPDEFTTL; | VNET_DEFINE(int, ip_defttl) = IPDEFTTL; | ||||
SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(ip_defttl), 0, | &VNET_NAME(ip_defttl), 0, | ||||
"Maximum TTL on IP packets"); | "Maximum TTL on IP packets"); | ||||
VNET_DEFINE(struct inpcbinfo, ripcbinfo); | VNET_DEFINE(struct inpcbinfo, ripcbinfo); | ||||
#define V_ripcbinfo VNET(ripcbinfo) | #define V_ripcbinfo VNET(ripcbinfo) | ||||
▲ Show 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | if (inp->inp_moptions != NULL && | ||||
if (blocked != MCAST_PASS) { | if (blocked != MCAST_PASS) { | ||||
IPSTAT_INC(ips_notmember); | IPSTAT_INC(ips_notmember); | ||||
continue; | continue; | ||||
} | } | ||||
} | } | ||||
appended += rip_append(inp, ctx.ip, m, &ripsrc); | appended += rip_append(inp, ctx.ip, m, &ripsrc); | ||||
} | } | ||||
if (appended == 0 && | if (appended == 0 && ip_protox[ctx.ip->ip_p] == rip_input) { | ||||
inetsw[ip_protox[ctx.ip->ip_p]].pr_input == rip_input) { | |||||
IPSTAT_INC(ips_noproto); | IPSTAT_INC(ips_noproto); | ||||
IPSTAT_DEC(ips_delivered); | IPSTAT_DEC(ips_delivered); | ||||
icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL, 0, 0); | icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL, 0, 0); | ||||
} else | } else | ||||
m_freem(m); | m_freem(m); | ||||
return (IPPROTO_DONE); | return (IPPROTO_DONE); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 683 Lines • Show Last 20 Lines |