[PATCH] Ethernet cleanup; 802.1p input and M_PROMISC

Bruce M Simpson bms at incunabulum.net
Tue Mar 6 15:46:50 UTC 2007


Yar Tikhiy wrote:
> My proposed check for IFF_DRV_RUNNING is by no means a priority
> task.  I can add it by myself after you finish your great current
> project regarding ether_input() and friends.
>   
Just committed in p4:

==== //depot/user/bms/netdev/sys/net/if_ethersubr.c#6 - 
/home/bms/p4/netdev/sys/net/if_ethersubr.c ====
--- /tmp/tmp.11470.0    Tue Mar  6 15:45:08 2007
+++ /home/bms/p4/netdev/sys/net/if_ethersubr.c  Tue Mar  6 15:45:01 2007
@@ -511,6 +511,13 @@
                m_freem(m);
                return;
        }
+#ifdef DIAGNOSTIC
+       if ((ifp->if_flags & IFF_DRV_RUNNING) == 0) {
+               if_printf(ifp, "discard frame at !IFF_DRV_RUNNING\n");
+               m_freem(m);
+               return;
+       }
+#endif

Thanks!
BMS


More information about the freebsd-net mailing list