| 1674 | } |
| 1675 | |
| 1676 | static void |
| 1677 | send_packet(struct vif *vifp, struct mbuf *m) |
| 1678 | { |
| 1679 | struct ip_moptions imo; |
| 1680 | int error __unused; |
| 1681 | |
| 1682 | VIF_LOCK_ASSERT(); |
| 1683 | |
| 1684 | imo.imo_multicast_ifp = vifp->v_ifp; |
| 1685 | imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1; |
| 1686 | imo.imo_multicast_loop = 1; |
| 1687 | imo.imo_multicast_vif = -1; |
| 1688 | STAILQ_INIT(&imo.imo_head); |
| 1689 | |
| 1690 | /* |
| 1691 | * Re-entrancy should not be a problem here, because |
| 1692 | * the packets that we send out and are looped back at us |
| 1693 | * should get rejected because they appear to come from |
| 1694 | * the loopback interface, thus preventing looping. |
| 1695 | */ |
| 1696 | error = ip_output(m, NULL, NULL, IP_FORWARDING, &imo, NULL); |
| 1697 | CTR3(KTR_IPMF, "%s: vif %td err %d", __func__, |
| 1698 | (ptrdiff_t)(vifp - V_viftable), error); |
| 1699 | } |
| 1700 | |
| 1701 | /* |
| 1702 | * Stubs for old RSVP socket shim implementation. |
no test coverage detected