diff options
author | sam <sam@FreeBSD.org> | 2002-11-14 23:46:04 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2002-11-14 23:46:04 +0000 |
commit | ad30a004454fdbce77e4ea74fce4280cee5cf184 (patch) | |
tree | a1549f1c47369e052bea6076546aba9e6050efd9 /sys/netinet/ip_dummynet.c | |
parent | fce3efcc4220b8edc30fc0bde117afd4e92315a9 (diff) | |
download | FreeBSD-src-ad30a004454fdbce77e4ea74fce4280cee5cf184.zip FreeBSD-src-ad30a004454fdbce77e4ea74fce4280cee5cf184.tar.gz |
track changes to not strip the Ethernet header from input packets
Reviewed by: many
Approved by: re
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r-- | sys/netinet/ip_dummynet.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 16ad64b..7c12e39 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -440,7 +440,6 @@ transmit_event(struct dn_pipe *pipe) case DN_TO_ETH_DEMUX: { struct mbuf *m = (struct mbuf *)pkt ; - struct ether_header *eh; if (pkt->dn_m->m_len < ETHER_HDR_LEN && (pkt->dn_m = m_pullup(pkt->dn_m, ETHER_HDR_LEN)) == NULL) { @@ -448,22 +447,20 @@ transmit_event(struct dn_pipe *pipe) break; } /* - * same as ether_input, make eh be a pointer into the mbuf - */ - eh = mtod(pkt->dn_m, struct ether_header *); - m_adj(pkt->dn_m, ETHER_HDR_LEN); - /* * bdg_forward() wants a pointer to the pseudo-mbuf-header, but * on return it will supply the pointer to the actual packet * (originally pkt->dn_m, but could be something else now) if * it has not consumed it. */ if (pkt->dn_dir == DN_TO_BDG_FWD) { - m = bdg_forward_ptr(m, eh, pkt->ifp); + /* + * same as ether_input, make eh be a pointer into the mbuf + */ + m = bdg_forward_ptr(m, pkt->ifp); if (m) m_freem(m); } else - ether_demux(NULL, eh, m); /* which consumes the mbuf */ + ether_demux(NULL, m); /* which consumes the mbuf */ } break ; case DN_TO_ETH_OUT: |