Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_icmp.c
Show First 20 Lines • Show All 769 Lines • ▼ Show 20 Lines | icmp_reflect(struct mbuf *m) | ||||
struct in_addr t; | struct in_addr t; | ||||
struct nhop_object *nh; | struct nhop_object *nh; | ||||
struct mbuf *opts = NULL; | struct mbuf *opts = NULL; | ||||
int optlen = (ip->ip_hl << 2) - sizeof(struct ip); | int optlen = (ip->ip_hl << 2) - sizeof(struct ip); | ||||
NET_EPOCH_ASSERT(); | NET_EPOCH_ASSERT(); | ||||
if (IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || | if (IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || | ||||
IN_EXPERIMENTAL(ntohl(ip->ip_src.s_addr)) || | (IN_EXPERIMENTAL(ntohl(ip->ip_src.s_addr)) && !V_ip_allow_net240) || | ||||
IN_ZERONET(ntohl(ip->ip_src.s_addr)) ) { | (IN_ZERONET(ntohl(ip->ip_src.s_addr)) && !V_ip_allow_net0) ) { | ||||
m_freem(m); /* Bad return address */ | m_freem(m); /* Bad return address */ | ||||
ICMPSTAT_INC(icps_badaddr); | ICMPSTAT_INC(icps_badaddr); | ||||
goto done; /* Ip_output() will check for broadcast */ | goto done; /* Ip_output() will check for broadcast */ | ||||
} | } | ||||
t = ip->ip_dst; | t = ip->ip_dst; | ||||
ip->ip_dst = ip->ip_src; | ip->ip_dst = ip->ip_src; | ||||
▲ Show 20 Lines • Show All 371 Lines • Show Last 20 Lines |