From c52f1c7cbbbbfe4ec2a966ca393dabcb55c5cc96 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 27 Feb 2002 22:39:18 +0000 Subject: 2002-02-27 Eric Norum * net/radix.c: Properly handle fetching the default route when there is no route. This was a bug in the original FreeBSD code and this fix is from an updated version of their code. --- c/src/libnetworking/net/radix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'c/src/libnetworking/net/radix.c') diff --git a/c/src/libnetworking/net/radix.c b/c/src/libnetworking/net/radix.c index bc1b7ee1d1..d7419ccca4 100644 --- a/c/src/libnetworking/net/radix.c +++ b/c/src/libnetworking/net/radix.c @@ -264,8 +264,11 @@ rn_match(v_arg, head) /* * This extra grot is in case we are explicitly asked * to look up the default. Ugh! + * + * Never return the root node itself, it seems to cause a + * lot of confusion. */ - if ((t->rn_flags & RNF_ROOT) && t->rn_dupedkey) + if (t->rn_flags & RNF_ROOT) t = t->rn_dupedkey; return t; on1: -- cgit v1.2.3