Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/net Pull up revision 1.105 (requested by aymeric in...



details:   https://anonhg.NetBSD.org/src/rev/c40e2a100770
branches:  netbsd-1-6
changeset: 530239:c40e2a100770
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 02 14:49:47 2003 +0000

description:
Pull up revision 1.105 (requested by aymeric in ticket #1188):
ignore multicast PPPoE packets ASAP.
This improves performance a lot on slow machines behind a cable modem.
Protect it with PPPOE_SERVER as a reminder that this will have to be changed
if we add PPPoE server code in the kernel one day.

diffstat:

 sys/net/if_ethersubr.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 2d767800091e -r c40e2a100770 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Mon Jun 02 14:42:38 2003 +0000
+++ b/sys/net/if_ethersubr.c    Mon Jun 02 14:49:47 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.95.2.2 2003/01/26 10:32:57 jmc Exp $        */
+/*     $NetBSD: if_ethersubr.c,v 1.95.2.3 2003/06/02 14:49:47 tron Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.95.2.2 2003/01/26 10:32:57 jmc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.95.2.3 2003/06/02 14:49:47 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -796,6 +796,13 @@
 #if NPPPOE > 0
        case ETHERTYPE_PPPOEDISC:
        case ETHERTYPE_PPPOE:
+#ifndef PPPOE_SERVER
+               if (m->m_flags & (M_MCAST | M_BCAST)) {
+                       m_freem(m);
+                       return;
+               }
+#endif
+
                if (etype == ETHERTYPE_PPPOEDISC) 
                        inq = &ppoediscinq;
                else



Home | Main Index | Thread Index | Old Index