Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 1998 18:32:30 +0900 (JST)
From:      chi@bd.mbn.or.jp
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/8960: lnc driver does not set IFF_MULTICAST 
Message-ID:  <199812040932.SAA07552@bd.mbn.or.jp>

next in thread | raw e-mail | index | archive | help

>Number:         8960
>Category:       kern
>Synopsis:       lnc driver does not set IFF_MULTICAST
>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:   Fri Dec  4 01:40:01 PST 1998
>Last-Modified:
>Originator:     Chiharu Shibata
>Organization:
Japan FreeBSD Users Group
>Release:        FreeBSD 2.2.6-RELEASE i386
>Environment:

	all AMD PCnet based LAN board(lnc driver)

>Description:

	The lnc driver does not set IFF_MULTICAST flag
	even if "LNC_MULTICAST" is defined in /sys/i386/isa/if_lnc.c.

>How-To-Repeat:

	(1) Uncomment "#define LNC_MULTICAST" in /sys/i386/isa/if_lnc.c
	    or add "options LNC_MULTICAST" in kernel conf file.
	(2) Re-configure new kernel and boot.
	(3) Type "ifconfig -a".
	    >lnc0: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500

	    This should be the following.
	    >lnc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

>Fix:
	
--- if_lnc.c.orig	Thu Dec  3 15:50:12 1998
+++ if_lnc.c	Thu Dec  3 15:50:41 1998
@@ -69,6 +69,11 @@
 /* Some defines that should really be in generic locations */
 #define FCS_LEN 4
 #define MULTICAST_FILTER_LEN 8
+#ifdef LNC_MULTICAST
+#define LNC_IFF_DEFAULT (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST)
+#else
+#define LNC_IFF_DEFAULT (IFF_BROADCAST | IFF_SIMPLEX)
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1272,7 +1277,7 @@
 	sc->arpcom.ac_if.if_name = lncdriver.name;
 	sc->arpcom.ac_if.if_unit = unit;
 	sc->arpcom.ac_if.if_mtu = ETHERMTU;
-	sc->arpcom.ac_if.if_flags = IFF_BROADCAST | IFF_SIMPLEX;
+	sc->arpcom.ac_if.if_flags = LNC_IFF_DEFAULT;
 	sc->arpcom.ac_if.if_timer = 0;
 	sc->arpcom.ac_if.if_output = ether_output;
 	sc->arpcom.ac_if.if_start = lnc_start;
@@ -1383,7 +1388,7 @@
 
 	s = splimp();
 	lnc_stop(sc);
-	sc->arpcom.ac_if.if_flags |= IFF_BROADCAST | IFF_SIMPLEX; /* XXX??? */
+	sc->arpcom.ac_if.if_flags |= LNC_IFF_DEFAULT; /* XXX??? */
 
 	/*
 	 * This sets up the memory area for the controller. Memory is set up for
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812040932.SAA07552>