summaryrefslogtreecommitdiffstats
path: root/c/src/libnetworking/net/radix.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-27 22:39:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-27 22:39:18 +0000
commitc52f1c7cbbbbfe4ec2a966ca393dabcb55c5cc96 (patch)
tree30ee198367763ad995bf772bf51e0c025365acb1 /c/src/libnetworking/net/radix.c
parent2001-02-27 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-c52f1c7cbbbbfe4ec2a966ca393dabcb55c5cc96.tar.bz2
2002-02-27 Eric Norum <eric.norum@usask.ca>
* 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.
Diffstat (limited to '')
-rw-r--r--c/src/libnetworking/net/radix.c5
1 files changed, 4 insertions, 1 deletions
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: