[patch] Print the mac address for discarded oversize frames

Ian FREISLICH if at hetzner.co.za
Wed Nov 10 00:18:21 PST 2004


Hi

Does it not make sense to print the mac address of the offending
oversize frame generator, so at least the host generating these
frames can be investigated?

FWIW, the arrival of these frames seem to lock-up the rl0 (on
5.2-CURRENT #25: Tue Mar 30) until a keypress on the console.

Is it safe to call ether_ntoa() at this point?

Ian

--
Ian Freislich

Whitespace mangled:
Index: if_ethersubr.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if_ethersubr.c,v
retrieving revision 1.179
diff -u -d -r1.179 if_ethersubr.c
--- if_ethersubr.c      12 Oct 2004 10:33:41 -0000      1.179
+++ if_ethersubr.c      10 Nov 2004 08:08:21 -0000
@@ -507,8 +507,9 @@
        etype = ntohs(eh->ether_type);
        if (m->m_pkthdr.len >
            ETHER_MAX_FRAME(ifp, etype, m->m_flags & M_HASFCS)) {
-               if_printf(ifp, "discard oversize frame "
+               if_printf(ifp, "discard oversize frame from %s"
                                "(ether type %x flags %x len %u > max %lu)\n",
+                               ether_ntoa(eh), 
                                etype, m->m_flags, m->m_pkthdr.len,
                                ETHER_MAX_FRAME(ifp, etype,
                                                m->m_flags & M_HASFCS));



More information about the freebsd-current mailing list