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/exec/libnetworking/ChangeLog | 6 ++++++ c/src/exec/libnetworking/net/radix.c | 5 ++++- c/src/libnetworking/ChangeLog | 6 ++++++ c/src/libnetworking/net/radix.c | 5 ++++- cpukit/libnetworking/ChangeLog | 6 ++++++ cpukit/libnetworking/net/radix.c | 5 ++++- 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/c/src/exec/libnetworking/ChangeLog b/c/src/exec/libnetworking/ChangeLog index a0a3ae1c5a..57af52c6d8 100644 --- a/c/src/exec/libnetworking/ChangeLog +++ b/c/src/exec/libnetworking/ChangeLog @@ -1,3 +1,9 @@ +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. + 2001-02-01 Mike Siers * pppd/rtemspppd.c (rtems_pppd_disconnect): Modified to avoid bringing 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: diff --git a/c/src/libnetworking/ChangeLog b/c/src/libnetworking/ChangeLog index a0a3ae1c5a..57af52c6d8 100644 --- a/c/src/libnetworking/ChangeLog +++ b/c/src/libnetworking/ChangeLog @@ -1,3 +1,9 @@ +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. + 2001-02-01 Mike Siers * pppd/rtemspppd.c (rtems_pppd_disconnect): Modified to avoid bringing 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: diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog index a0a3ae1c5a..57af52c6d8 100644 --- a/cpukit/libnetworking/ChangeLog +++ b/cpukit/libnetworking/ChangeLog @@ -1,3 +1,9 @@ +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. + 2001-02-01 Mike Siers * pppd/rtemspppd.c (rtems_pppd_disconnect): Modified to avoid bringing diff --git a/cpukit/libnetworking/net/radix.c b/cpukit/libnetworking/net/radix.c index bc1b7ee1d1..d7419ccca4 100644 --- a/cpukit/libnetworking/net/radix.c +++ b/cpukit/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