Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_mroute.c
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Lines | |||||
SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, | SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, | ||||
&pim_squelch_wholepkt, 0, | &pim_squelch_wholepkt, 0, | ||||
"Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); | "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); | ||||
static const struct encaptab *pim_encap_cookie; | static const struct encaptab *pim_encap_cookie; | ||||
static int pim_encapcheck(const struct mbuf *, int, int, void *); | static int pim_encapcheck(const struct mbuf *, int, int, void *); | ||||
static int pim_input(struct mbuf *, int, int, void *); | static int pim_input(struct mbuf *, int, int, void *); | ||||
extern int in_mcast_loop; | |||||
static const struct encap_config ipv4_encap_cfg = { | static const struct encap_config ipv4_encap_cfg = { | ||||
.proto = IPPROTO_PIM, | .proto = IPPROTO_PIM, | ||||
.min_length = sizeof(struct ip) + PIM_MINLEN, | .min_length = sizeof(struct ip) + PIM_MINLEN, | ||||
.exact_match = 8, | .exact_match = 8, | ||||
.check = pim_encapcheck, | .check = pim_encapcheck, | ||||
.input = pim_input | .input = pim_input | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,425 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct ip_moptions imo; | struct ip_moptions imo; | ||||
int error __unused; | int error __unused; | ||||
VIF_LOCK_ASSERT(); | VIF_LOCK_ASSERT(); | ||||
imo.imo_multicast_ifp = vifp->v_ifp; | imo.imo_multicast_ifp = vifp->v_ifp; | ||||
imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1; | imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1; | ||||
imo.imo_multicast_loop = 1; | imo.imo_multicast_loop = !!in_mcast_loop; | ||||
imo.imo_multicast_vif = -1; | imo.imo_multicast_vif = -1; | ||||
STAILQ_INIT(&imo.imo_head); | STAILQ_INIT(&imo.imo_head); | ||||
/* | /* | ||||
* Re-entrancy should not be a problem here, because | * Re-entrancy should not be a problem here, because | ||||
* the packets that we send out and are looped back at us | * the packets that we send out and are looped back at us | ||||
* should get rejected because they appear to come from | * should get rejected because they appear to come from | ||||
* the loopback interface, thus preventing looping. | * the loopback interface, thus preventing looping. | ||||
▲ Show 20 Lines • Show All 1,276 Lines • Show Last 20 Lines |