kern/58537: netinet/if_ethersubr.c rev. 1.117+
Max Laier
max at love2party.net
Sat Oct 25 13:00:34 PDT 2003
>Number: 58537
>Category: kern
>Synopsis: netinet/if_ethersubr.c rev. 1.117+
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 25 13:00:32 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Max Laier
>Release: FreeBSD 5.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD router.laiers.local 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #1: Sun Oct 5 17:38:55 CEST 2003 root at router.laiers.local:/usr/obj/usr/src/sys/ALTQ i386
>Description:
The check if an ethernet packet is for the device it was recieved on
was made disfunctional with rev. 1.117:
if ((exp) != 0 && ... && (exp) == 0) is always FALSE!
where exp here is: (ifp->if_flags & IFF_PROMISC)
>How-To-Repeat:
Not sure, seems to work okay without that extra sanity check.
>Fix:
Patch (remove unwanted part):
--- if_ethersubr.c.diff begins here ---
--- if_ethersubr.c.orig Sat Oct 25 21:52:36 2003
+++ if_ethersubr.c Sat Oct 25 21:54:15 2003
@@ -638,8 +638,7 @@
if ((ifp->if_flags & IFF_PROMISC) != 0
&& (eh->ether_dhost[0] & 1) == 0
&& bcmp(eh->ether_dhost,
- IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0
- && (ifp->if_flags & IFF_PPROMISC) == 0) {
+ IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0) {
m_freem(m);
return;
}
--- if_ethersubr.c.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list