diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-02-27 22:39:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-02-27 22:39:18 +0000 |
commit | c52f1c7cbbbbfe4ec2a966ca393dabcb55c5cc96 (patch) | |
tree | 30ee198367763ad995bf772bf51e0c025365acb1 /c/src/exec/libnetworking/net/radix.c | |
parent | 2001-02-27 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-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 'c/src/exec/libnetworking/net/radix.c')
-rw-r--r-- | c/src/exec/libnetworking/net/radix.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/exec/libnetworking/net/radix.c b/c/src/exec/libnetworking/net/radix.c index bc1b7ee1d1..d7419ccca4 100644 --- a/c/src/exec/libnetworking/net/radix.c +++ b/c/src/exec/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: |