CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2015/07/07 03:39:28

Modified files:
        sys/net        : radix.c 

Log message:
Do not return internal nodes to the upper layer in rn_lookup().

The limit between the radix layer and the route layer is somewhat
vague, if it exists at all.  This changes prevent rtrequest1(9) to
find and delete the root node (RNF_ROOT) when trying to delete a
non-existing default route:

# route delete 0.0.0.0
delete host 0.0.0.0
# route delete 0.0.0.0
route: writing to routing socket: No such process
delete host 0.0.0.0: not in table

Historically rn_delete() was a no-op when called with an internal
node as argument.  But there's no reason to manipulate such node.
In a better world rn_match() would contain such check, but let's
change the perfect-match function for the moment as this fixes a
bug and many dragons are lurking in there.

Fix a regression introduced by the big refactoring of r1.40 and
reported by tobias@.

ok tobias@, claudio@, pelikan@

Reply via email to