From owner-freebsd-current@FreeBSD.ORG Wed Nov 10 08:18:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0CDF16A4CE for ; Wed, 10 Nov 2004 08:18:20 +0000 (GMT) Received: from hetzner.co.za (lfw.hetzner.co.za [196.7.18.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 089F643D31 for ; Wed, 10 Nov 2004 08:18:20 +0000 (GMT) (envelope-from ianf@hetzner.co.za) Received: from localhost ([127.0.0.1]) by hetzner.co.za with esmtp (Exim 3.36 #1) id 1CRngH-000JrE-00 for current@freebsd.org; Wed, 10 Nov 2004 10:18:17 +0200 To: current@freebsd.org From: Ian FREISLICH X-Attribution: BOFH Date: Wed, 10 Nov 2004 10:18:17 +0200 Sender: ianf@hetzner.co.za Message-Id: Subject: [patch] Print the mac address for discarded oversize frames X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 08:18:21 -0000 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));