| 1652 | } |
| 1653 | |
| 1654 | static void |
| 1655 | phyint_send(struct ip *ip, struct vif *vifp, struct mbuf *m) |
| 1656 | { |
| 1657 | struct mbuf *mb_copy; |
| 1658 | int hlen = ip->ip_hl << 2; |
| 1659 | |
| 1660 | VIF_LOCK_ASSERT(); |
| 1661 | |
| 1662 | /* |
| 1663 | * Make a new reference to the packet; make sure that |
| 1664 | * the IP header is actually copied, not just referenced, |
| 1665 | * so that ip_output() only scribbles on the copy. |
| 1666 | */ |
| 1667 | mb_copy = m_copypacket(m, M_NOWAIT); |
| 1668 | if (mb_copy && (!M_WRITABLE(mb_copy) || mb_copy->m_len < hlen)) |
| 1669 | mb_copy = m_pullup(mb_copy, hlen); |
| 1670 | if (mb_copy == NULL) |
| 1671 | return; |
| 1672 | |
| 1673 | send_packet(vifp, mb_copy); |
| 1674 | } |
| 1675 | |
| 1676 | static void |
| 1677 | send_packet(struct vif *vifp, struct mbuf *m) |
no test coverage detected