Subject: bin/22568: route6d fails to pick up existing local routes
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <andrew.e.white@motorola.com>
List: netbsd-bugs
Date: 08/22/2003 06:33:55
>Number:         22568
>Category:       bin
>Synopsis:       route6d fails to pick up existing local routes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 22 06:34:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andrew White
>Release:        1.6 i386
>Organization:
MARC
>Environment:
NetBSD gateway.private.arpa. 1.6 NetBSD 1.6 (GENERIC) #2: Mon Jun 23 13:49:32 EST 2003     root@conan.testbed.arc.corp.mot.com.:/asy/awhite/netbsd/obj/sys/arch/i386/compile/GENERIC i386

>Description:
When route6d starts, it fails to include in the internal routing table local route indicators for local routes that do not have the source address attached to an interface.  For example, the stf route 2002:abcd:efgh::abcd:efgh -> ::1 (lo0).  This route is then tossed back and forth until it reaches infinity (16) and is removed from the table.  All of a sudden stf connections using the stf0 address fail.

Even if not tossed back and forth I notice that the route ages in the rrt table.  It should NOT age.

I notice the 2002:abcd:efgh:1::1 address assigned to lo0 creates a route 2002:abcd:efgh:1::1 -> 2002:abcd:efgh:1::1 (lo0) which is removed in favour of the 2002:abcd:efgh:1::1 -> 00:11:22:33:44:55 (lo0) MAC route.
>How-To-Repeat:
Set up stf connection for 2002:abcd:efgh::abcd:efgh (for example).  A route is added to the routing table for 2002:abcd:efgh::abcd:efgh -> ::1 (lo0).

Now run route6d -N intf0 (where intf0 is your uplink interface).  Quite soon the above route will reach a 16 metric and then be removed, breaking much stf functionality involving the gateway.
>Fix:
Perhaps sniff the routing table BEFORE running ifconfig() and pre-install any host route pointing to a local interface (H flag but not G, C or c) into the rrt structure with time of 0, so it can't time out.
>Release-Note:
>Audit-Trail:
>Unformatted: