[ECOS] show_network_tables doesn't show host routes
Andrew Lunn
andrew@lunn.ch
Sat Mar 27 18:15:00 GMT 2004
On Wed, Mar 24, 2004 at 03:45:51PM -0800, Matt Jerdonek wrote:
> I'm having trouble getting show_network_tables to
> display host routes. I tracked this down to the
> following code in bsd_tcpip\ver\src\ecos\support.c
>
> static int
> _dumpentry(struct radix_node *rn, void *vw)
> {
> // .... snip ....
> if ((rt->rt_flags & (RTF_UP | RTF_WASCLONED)) ==
> RTF_UP) {
> if (netmask == NULL) {
> return 0;
> }
>
> It appears as if the netmask is 0, which is the case
> for host routes, the route will not be displayed. Is
> this intentional?
I took the check out and it seems to work OK:
Destination Gateway Mask Flags Interface
127.0.0.0 127.0.0.1 255.0.0.0 UG lo0
127.0.0.1 127.0.0.1 UH lo0
192.168.10.0 192.168.10.0 255.255.255.0 U eth0
:: fe80:1::2ff:ecff:fe21:1ecd /0 UG eth0
::1 ::1 UH lo0
3ffe:302:11:2::c0a8:a0a 3ffe:302:11:2::c0a8:a0a UH lo0
fe80:1:: fe80:1:: /64 U eth0
fe80:1::201:2ff:fe03:fe06 fe80:1::201:2ff:fe03:fe06 UH lo0
fe80:2:: fe80:2::1 /64 U lo0
fe80:2::1 fe80:2::1 UH lo0
fec0:0:0:2:: fec0:0:0:2:: /64 U eth0
fec0::2:201:2ff:fe03:fe06 fec0::2:201:2ff:fe03:fe06 UH lo0
ff01:1:: ff01:1:: /32 U eth0
ff01:2:: ::1 /32 U lo0
ff02:1:: ff02:1:: /32 U eth0
ff02:2:: ::1 /32 U lo0
Andrew
-------------- next part --------------
Index: net/bsd_tcpip/current//ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.42
diff -u -r1.42 ChangeLog
--- net/bsd_tcpip/current//ChangeLog 18 Feb 2004 11:05:15 -0000 1.42
+++ net/bsd_tcpip/current//ChangeLog 27 Mar 2004 18:14:56 -0000
@@ -1,3 +1,8 @@
+2004-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/ecos/support.c (_dumpentry): Don't skip routes which don't
+ have a netmask. These are seem to be valid host routes.
+
2004-02-18 Jonathan Larmour <jifl@eCosCentric.com>
* doc/freebsd.sgml: Import text from openbsd doc about use of __ECOS
Index: net/bsd_tcpip/current//src/ecos/support.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/ecos/support.c,v
retrieving revision 1.11
diff -u -r1.11 support.c
--- net/bsd_tcpip/current//src/ecos/support.c 22 Nov 2003 12:59:21 -0000 1.11
+++ net/bsd_tcpip/current//src/ecos/support.c 27 Mar 2004 18:14:58 -0000
@@ -1022,9 +1022,6 @@
netmask = rt_mask(rt);
genmask = rt->rt_genmask;
if ((rt->rt_flags & (RTF_UP | RTF_WASCLONED)) == RTF_UP) {
- if (netmask == NULL) {
- return 0;
- }
_inet_ntop(dst, addr, sizeof(addr));
(*pr)("%-15s ", addr);
if (gate != NULL) {
More information about the Ecos-patches
mailing list