aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_pppoe.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1999-10-29 04:32:27 +0000
committerJulian Elischer <julian@FreeBSD.org>1999-10-29 04:32:27 +0000
commitd9da9cba4452e7212ed4a3e475e7e4fc990a9849 (patch)
treef6e15a3615f71b5b471286114761aa561eb2caf2 /sys/netgraph/ng_pppoe.c
parentd3d3794b0e06baeca2ce6db1462b865758d7f90d (diff)
downloadsrc-d9da9cba4452e7212ed4a3e475e7e4fc990a9849.tar.gz
src-d9da9cba4452e7212ed4a3e475e7e4fc990a9849.zip
When the session is running, don't include the ethernet header in the length of the payload.
Notes
Notes: svn path=/head/; revision=52614
Diffstat (limited to 'sys/netgraph/ng_pppoe.c')
-rw-r--r--sys/netgraph/ng_pppoe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index d28c995c91e0..9d580e5bef4a 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -1125,14 +1125,15 @@ AAA
/*
* Bang in a pre-made header, and set the length up
* to be correct. Then send it to the ethernet driver.
+ * But first correct the length.
*/
+ sp->pkt_hdr.ph.length = htons((short)(m->m_pkthdr.len));
M_PREPEND(m, sizeof(*wh), M_DONTWAIT);
if (m == NULL) {
LEAVE(ENOBUFS);
}
wh = mtod(m, struct pppoe_full_hdr *);
bcopy(&sp->pkt_hdr, wh, sizeof(*wh));
- wh->ph.length = htons((short)(m->m_pkthdr.len));
NG_SEND_DATA( error, privp->ethernet_hook, m, meta);
privp->packets_out++;
break;