Subject: kern/29273: SIOCADDMULTI leaves an interface intermediate state on errors.
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 02/07/2005 21:24:00
>Number:         29273
>Category:       kern
>Synopsis:       SIOCADDMULTI leaves an interface intermediate state on errors.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 07 21:24:00 +0000 2005
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 2.99.14
>Organization:

>Environment:
	
	
System: NetBSD kaeru 2.99.14 NetBSD 2.99.14 (build.kaeru) #181: Mon Feb 7 17:43:33 JST 2005 takashi@kaeru:/usr/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
	SIOCADDMULTI is often implemented as the following:

		error = ether_ioctl();
		if (error == ENETRESET) {
			error = xxx_init();
		}
		return error;

	because a caller doesn't have a way to know which of ether_ioctl()
	or xxx_init() failed, it can't know if SIOCDELMULTI is needed
	to clean up in-core multicast list.

>How-To-Repeat:
	
>Fix:
	cleanup in-core multicast list in the case of xxx_init failed.
	and/or document a way to recover from errors.

>Unformatted: