summaryrefslogtreecommitdiffstats
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
parent1bbe2e1dbb59eaa89d637ffd95a04ba2919d7010 (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.
-rw-r--r--c/src/exec/libnetworking/ChangeLog6
-rw-r--r--c/src/exec/libnetworking/net/radix.c5
-rw-r--r--c/src/libnetworking/ChangeLog6
-rw-r--r--c/src/libnetworking/net/radix.c5
-rw-r--r--cpukit/libnetworking/ChangeLog6
-rw-r--r--cpukit/libnetworking/net/radix.c5
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 <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.
+
2001-02-01 Mike Siers <mikes@poliac.com>
* 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 <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.
+
2001-02-01 Mike Siers <mikes@poliac.com>
* 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 <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.
+
2001-02-01 Mike Siers <mikes@poliac.com>
* 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: