Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/ip_mroute.c
Show First 20 Lines • Show All 1,674 Lines • ▼ Show 20 Lines | return; | ||||
send_packet(vifp, mb_copy); | send_packet(vifp, mb_copy); | ||||
} | } | ||||
static void | static void | ||||
send_packet(struct vif *vifp, struct mbuf *m) | send_packet(struct vif *vifp, struct mbuf *m) | ||||
{ | { | ||||
struct ip_moptions imo; | struct ip_moptions imo; | ||||
struct in_multi *imm[2]; | |||||
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 = 1; | ||||
imo.imo_multicast_vif = -1; | imo.imo_multicast_vif = -1; | ||||
imo.imo_num_memberships = 0; | STAILQ_INIT(&imo.imo_head); | ||||
imo.imo_max_memberships = 2; | |||||
imo.imo_membership = &imm[0]; | |||||
/* | /* | ||||
* 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. | ||||
*/ | */ | ||||
error = ip_output(m, NULL, NULL, IP_FORWARDING, &imo, NULL); | error = ip_output(m, NULL, NULL, IP_FORWARDING, &imo, NULL); | ||||
▲ Show 20 Lines • Show All 1,240 Lines • Show Last 20 Lines |