Date: Tue, 13 Oct 2009 05:36:40 GMT From: Roman Bogorodskiy <novel@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/139559: several tun(4) interfaces can be created with same dst addr Message-ID: <200910130536.n9D5aeMJ015276@freefall.freebsd.org> Resent-Message-ID: <200910130540.n9D5e1uK015309@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@underworld:~ %> sudo ifconfig tun4 create
(09:10) novel@underworld:~ %> sudo ifconfig tun5 create
(09:10) novel@underworld:~ %> sudo ifconfig tun4 10.0.0.2 10.0.0.1
(09:10) novel@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@underworld:~ %> ifconfig tun5
tun5: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
(09:10) novel@underworld:~ %> sudo ifconfig tun5 10.0.0.3 10.0.0.1
ifconfig: ioctl (SIOCAIFADDR): File exists
(09:18) novel@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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910130536.n9D5aeMJ015276>
