[Xorp-users] 1.1-RC can't change MRIB nexthop

Pavlin Radoslavov pavlin@icir.org
Sat, 02 Apr 2005 03:55:12 -0800


> On Apr 2, 2005 5:56 PM, Pavlin Radoslavov <pavlin@icir.org> wrote:
> > > Dear Pavlin/Atanu,
> > >
> > > I am testing XORP 1.1-RC for PIM-SM multicast routing and I found a bug.
> > > The bug is XORP doesn't change the MRIB nexthop if I change the
> > > nexthop of a route.
> > > Adding and removing a route is fine.
> > >
> > > I am running XORP on FreeBSD 4.10-Release.
> > >
> > > Would you check this problem?
> > 
> > Husni,
> > 
> > How do we replicate the problem? E.g., do you use static_routes, and
> > then you change the nexthop via xorpsh or do you use some other
> > mechanism.
> > 
> 
> I used the "route change" command from the login shell.
> I guess the similar mechanism will apply when I use Zebra beasts as
> the unicast routing daemons, since XORP will have to detect route
> changes from the kernel.

Yes, you are right. The "route change" command on *BSD didn't change
the MRIB. I just committed a simple fix to fib2mrib which should
take care of the problem.

The patch is very simple, so if you don't want to checkout the
lastest tree from CVS, you can apply it by hand (see below).

Please let me know if it doesn't fix the problem for you.

Thanks!
Pavlin


Index: fib2mrib_node.cc
===================================================================
RCS file: /usr/local/share/doc/apache/cvs/xorp/fib2mrib/fib2mrib_node.cc,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- fib2mrib_node.cc	25 Mar 2005 02:53:21 -0000	1.21
+++ fib2mrib_node.cc	2 Apr 2005 11:48:24 -0000	1.22
@@ -12,7 +12,7 @@
 // notice is a summary of the XORP LICENSE file; the license in that file is
 // legally binding.
 
-#ident "$XORP: xorp/fib2mrib/fib2mrib_node.cc,v 1.21 2005/03/25 02:53:21 pavlin Exp $"
+#ident "$XORP: xorp/fib2mrib/fib2mrib_node.cc,v 1.22 2005/04/02 11:48:24 pavlin Exp $"
 
 //
 // Fib2mrib node implementation.
@@ -697,7 +697,8 @@ Fib2mribNode::add_route(const Fib2mribRo
 	// we just replace the previously received route with the
 	// new one.
 	//
-	return (replace_route(fib2mrib_route, error_msg));
+	updated_route.set_replace_route();
+	return (replace_route(updated_route, error_msg));
     }
 
     //