diff options
author | Sam Leffler <sam@FreeBSD.org> | 2002-11-14 23:46:04 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2002-11-14 23:46:04 +0000 |
commit | eec3a0b17fec28befe597b444a6f0e82a7687dce (patch) | |
tree | a1549f1c47369e052bea6076546aba9e6050efd9 | |
parent | ccb2acfe1b5fde0a3a91cf6876429c44ac16930f (diff) | |
download | src-eec3a0b17fec28befe597b444a6f0e82a7687dce.tar.gz src-eec3a0b17fec28befe597b444a6f0e82a7687dce.zip |
track changes to not strip the Ethernet header from input packets
Reviewed by: many
Approved by: re
Notes
Notes:
svn path=/head/; revision=106935
-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 16ad64b2e78b..7c12e39836d5 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: |