Take into account the two byte PPP protocol discrimator following the PPPoE
header when calculating the MTU. Ooops... Thanks to Mario Kemper for noting this.
This commit is contained in:
parent
8c8d2fe9a8
commit
74f0920eda
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_pppoe.c,v 1.3 2001/06/18 12:32:47 martin Exp $ */
|
||||
/* $NetBSD: if_pppoe.c,v 1.4 2001/06/24 20:35:50 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Martin Husemann. All rights reserved.
|
||||
|
@ -177,7 +177,7 @@ pppoeattach()
|
|||
for (sc = pppoe_softc; i < NPPPOE; sc++) {
|
||||
sprintf(sc->sc_sppp.pp_if.if_xname, "pppoe%d", i++);
|
||||
sc->sc_sppp.pp_if.if_softc = sc;
|
||||
sc->sc_sppp.pp_if.if_mtu = ETHERMTU - PPPOE_HEADERLEN;
|
||||
sc->sc_sppp.pp_if.if_mtu = ETHERMTU - PPPOE_HEADERLEN - 2; /* two byte PPP protocol discriminator, then IP data */
|
||||
sc->sc_sppp.pp_if.if_flags = IFF_SIMPLEX | IFF_POINTOPOINT
|
||||
| IFF_MULTICAST | IFF_LINK1; /* auto "dial" */
|
||||
sc->sc_sppp.pp_if.if_type = IFT_PPP;
|
||||
|
|
Loading…
Reference in New Issue