kern/139559: several tun(4) interfaces can be created with same dst addr

Roman Bogorodskiy novel at FreeBSD.org
Tue Oct 13 05:40:02 UTC 2009


>Number:         139559
>Category:       kern
>Synopsis:       several tun(4) interfaces can be created with same dst addr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 13 05:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:

>Description:
	I'm using -CURRENT for some time and I use tun(4) in pair with ppp(8).
	I have several connections and sometimes it happens that remote pair
	sends dst address that is already used on other tun(4) interface. Previously,
	ppp complained about "File exists" error when assigning a new address
	and redialed. Few days (maybe weeks) ago I've noted a regression: ppp
	complains about "File exists", but nevertheless address gets assigned
	to the interface. I've experimented a bit with it and I have an
	impression that there's some bug in SIOCAIFADDR implementation and it's
	not related to ppp directly. See the 'How-To-Repeat' section.

>How-To-Repeat:
	(09:09) novel at underworld:~ %> sudo ifconfig tun4 create
	(09:10) novel at underworld:~ %> sudo ifconfig tun5 create
	(09:10) novel at underworld:~ %> sudo ifconfig tun4 10.0.0.2 10.0.0.1
	(09:10) novel at underworld:~ %> ifconfig tun4
	tun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
        	inet 10.0.0.2 --> 10.0.0.1 netmask 0xff000000
	(09:10) novel at underworld:~ %> ifconfig tun5
	tun5: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
	(09:10) novel at underworld:~ %> sudo ifconfig tun5 10.0.0.3 10.0.0.1
	ifconfig: ioctl (SIOCAIFADDR): File exists
	(09:18) novel at underworld:~ %> ifconfig tun5
	tun5: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
        	inet 10.0.0.3 --> 10.0.0.1 netmask 0xff000000
	(09:18) novel at underworld:~ %>

	As you can see, ifconfig throwed the "File exists", but for some reason
	address got assigned, which seems to be wrong to me. Though, data for
	tun5 wasn't added to the routing table.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list