[6bone-pl] patch to Solaris mrt 980728 (nexthop or link local)

Rafal Maszkowski rzm w icm.edu.pl
Pon, 24 Sie 1998, 03:34:32 MEST


Long TIMEOUT delay: I'm getting disconnected still with this patch.
In non-threaded version (I'm using it for easier debugging) the timeout
is some 900 s. The test I've done before sending the patch was made on
home non-connected Linux, where mrtd I think recently was also compiled
with threads disabled.


My problems described in last two e-mails (not CCed to any list:
new->nexthop in rib_kernel_update_route contains link local address,
not next-hop gateway addres so assigning it to nexthop variable in
rib.c:264 causes adding a kernel route with link local address as a
gateway address which I suppose isn't correct.) seem to be solved by
following patch to view.c:

diff -ru mrt-1.4.8a-980728.masaki+/src/include/version.h mrt-1.4.8a-980728.masaki++/src/include/version.h
--- mrt-1.4.8a-980728.masaki+/src/include/version.h	Tue Jul 28 15:34:39 1998
+++ mrt-1.4.8a-980728.masaki++/src/include/version.h	Mon Aug 24 03:12:10 1998
@@ -2,5 +2,5 @@
  * $Id: version.h,v 1.16 1998/07/28 13:34:39 masaki Exp $
  */
 
-#define MRT_VERSION "1.4.8 snapshot [07/28/98]"
+#define MRT_VERSION "1.4.8 snapshot [07/28/98]+masaki0820+rzm20+rzm24"
 
diff -ru mrt-1.4.8a-980728.masaki+/src/lib/bgp_proto/view.c mrt-1.4.8a-980728.masaki++/src/lib/bgp_proto/view.c
--- mrt-1.4.8a-980728.masaki+/src/lib/bgp_proto/view.c	Fri Jul 17 20:29:07 1998
+++ mrt-1.4.8a-980728.masaki++/src/lib/bgp_proto/view.c	Mon Aug 24 02:52:27 1998
@@ -38,8 +38,8 @@
             gattr->nexthop = Ref_Prefix (attr->nexthop2);
 	}
 #ifdef HAVE_IPV6
-	else if (attr->link_local) {
-            gattr->nexthop = Ref_Prefix (attr->link_local);
+	else if ( /* attr->link_local */ attr->nexthop ) {
+            gattr->nexthop = Ref_Prefix (/* attr->link_local */ attr->nexthop);
 	}
 #endif /* HAVE_IPV6 */
 	else {

I see no reason why something called nexthop should contain a link local
address. If I understand correctly ll address is only for router advertisements
which mrtd is not dealing with. The nexthop variable is used as a gateway
later in the code and it should be some global gateway address, not ll address.
Why the non-patched code works on Linux? You may be getting a real interface
address into the variable where link local should be stored. Just a hypotesis.
Somebody may want to check if my patch breaks Linux version (Cc to Polish
6bone list and to mrt-discuss).


solaris.c patch is temporary and will work for tunnels-only configuration.
I'm not using real Ethernet interfaces for v6 connections so I even don't
know how it could look like. Probably the interfaces list should be searched
for ifname#v6 and ifname:1. If the 1st exists it should be used. If not (and
maybe only if ifname:1 exists) just ifname without any suffix should be used.

diff -ru mrt-1.4.8a-980728.masaki+/src/lib/kernel/solaris.c mrt-1.4.8a-980728.masaki++/src/lib/kernel/solaris.c
--- mrt-1.4.8a-980728.masaki+/src/lib/kernel/solaris.c	Fri Jul 17 20:31:27 1998
+++ mrt-1.4.8a-980728.masaki++/src/lib/kernel/solaris.c	Mon Aug 24 01:42:07 1998
@@ -436,9 +436,9 @@
 	    strncpy (rt6.v6rt_ifname, interface->name,
 		     sizeof (rt6.v6rt_ifname));
 	    /* XXX dirty way! */
-	    if (strchr (rt6.v6rt_ifname, '#') == NULL) {
+/*	    if (strchr (rt6.v6rt_ifname, '#') == NULL) {
 		strcat (rt6.v6rt_ifname, "#v6");
-	    }
+	    }	*/
 	}
 
 	switch (cmd) {

R.



Więcej informacji o liście dyskusyjnej 6BONE-PL