NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/39203: PPPoE issues with broken MTU/MRU implementations



>Number:         39203
>Category:       kern
>Synopsis:       PPPoE issues with broken MTU/MRU implementations
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 25 04:30:00 +0000 2008
>Originator:     Paul Ripke
>Release:        All
>Organization:
>Environment:
System: NetBSD zion.stix.org.au 4.0_STABLE NetBSD 4.0_STABLE (ZION) #5: Wed May 
7 21:32:47 EST 2008 
stix%zion.stix.org.au@localhost:/export/netbsd/netbsd-4/obj.i386/export/netbsd/netbsd-4/src/sys/arch/i386/compile/ZION
 i386
Architecture: i386
Machine: i386
>Description:

It appears some ISPs ignore MRU negotiation during pppoe setup, and
use full 1500 byte MTU/MRU. This results in NetBSD dropping the
oversize/giant packets, assuming they even make it to the system. The
attached patch stops the NetBSD kernel from dropping these packets.

See also:
http://mail-index.netbsd.org/tech-net/2008/04/14/msg000406.html
http://mail-index.netbsd.org/tech-net/2003/08/15/0002.html
http://forum.exetel.com.au/viewtopic.php?t=26544

>How-To-Repeat:

Obtain account with broken ISP, then try large pings or VPN with large
UDP authentication certificates.
>Fix:

I have been running with the attached patch (or the netbsd-4 equivalent)
for a few months successfully. Of course, this will only work if the
frames make it to the NIC (some 10/100Mbit switches drop giants) and
the NIC will accept these large frames (gigabit NICs generally should).

Thanks to Quentin for the initial patch - I've made the attached non-
selectable, but that's easy enough to add back if required. Also, my
NIC (msk0) accepts the giants without modification.

Index: sys/net/if_ether.h
===================================================================
RCS file: /usr/netbsd/cvsroot/src/sys/net/if_ether.h,v
retrieving revision 1.51
diff -u -d -r1.51 if_ether.h
--- sys/net/if_ether.h  22 May 2008 01:15:33 -0000      1.51
+++ sys/net/if_ether.h  1 Jul 2008 05:01:03 -0000
@@ -56,6 +56,7 @@
  * Some Ethernet extensions.
  */
 #define        ETHER_VLAN_ENCAP_LEN 4  /* length of 802.1Q VLAN encapsulation 
*/
+#define        ETHER_PPPOE_ENCAP_LEN 8 /* length of PPPoE encapsulation */
 
 /*
  * Ethernet address - 6 octets
@@ -90,7 +91,8 @@
 #define        ETHER_MAX_FRAME(ifp, etype, hasfcs)                             
\
        ((ifp)->if_mtu + ETHER_HDR_LEN +                                \
         ((hasfcs) ? ETHER_CRC_LEN : 0) +                               \
-        (((etype) == ETHERTYPE_VLAN) ? ETHER_VLAN_ENCAP_LEN : 0))
+        (((etype) == ETHERTYPE_VLAN) ? ETHER_VLAN_ENCAP_LEN : 0) +     \
+        (((etype) == ETHERTYPE_PPPOE) ? ETHER_PPPOE_ENCAP_LEN : 0))
 
 /*
  * Ethernet CRC32 polynomials (big- and little-endian verions).



Home | Main Index | Thread Index | Old Index