kern/106722: ifconfig may not connect an interface to known network
Vladimir Ivanov
wawa at yandex-team.ru
Thu Dec 14 09:43:55 PST 2006
>Number: 106722
>Category: kern
>Synopsis: ifconfig may not connect an interface to known network
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 14 17:40:09 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Vladimir Ivanov
>Release: RELENG_6
>Organization:
Yandex LLC
>Environment:
FreeBSD karoto.yandex.net 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #20: Fri Dec 1 20:29:20 MSK 2006 root at barbedo.yandex.net:/usr/obj/usr/src/sys/CORE-RTR-RELENG_6 i386
>Description:
ifconfig may not connect an interface to known network.
It's a very unpleasant problem if you being use QUAGGA e.g.
>How-To-Repeat:
route add 10.0.0.0/24 some.gateway
ifconfig IFACE 10.0.0.1/24 alias
>Fix:
Patch attached with submission follows:
--- sys/net/route.c.orig 2006-12-01 20:28:22.000000000 +0300
+++ sys/net/route.c 2006-12-01 20:28:22.000000000 +0300
@@ -809,6 +809,12 @@ rtrequest1(int req, struct rt_addrinfo *
RT_UNLOCK(rt2);
rn = rnh->rnh_addaddr(ndst, netmask,
rnh, rt->rt_nodes);
+ } else if (!(flags & RTF_GATEWAY) && (rt2 -> rt_flags & RTF_GATEWAY)) {
+ /* dirty hack allows ifconfig to setup address which is known to RT */
+ rtexpunge(rt2);
+ RT_UNLOCK(rt2);
+ rn = rnh->rnh_addaddr(ndst, netmask,
+ rnh, rt->rt_nodes);
} else if (rt2) {
/* undo the extra ref we got */
RTFREE_LOCKED(rt2);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list