From 171eee31edbddbd8906447dc8725e0513227d013 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Thu, 27 Jul 2006 16:11:02 +0000 Subject: [zebra] Connected routes must always be added to main table 2006-07-27 Rumen Svobodnikov * connected.c: (connected_up_ipv4) interface connected routes always go to table main (or otherwise they cannot be used by linux as nexthops) * zserv.c: (zread_ipv4_add) send route to the correct routing table * zebra_rib.c (static_install_ipv4) set routing table --- zebra/ChangeLog | 8 ++++++++ zebra/connected.c | 2 +- zebra/zebra_rib.c | 1 + zebra/zserv.c | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) (limited to 'zebra') diff --git a/zebra/ChangeLog b/zebra/ChangeLog index aae20155..36e717d9 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,11 @@ +2006-07-27 Rumen Svobodnikov + + * connected.c: (connected_up_ipv4) interface connected routes always + go to table main (or otherwise they cannot be used by linux as + nexthops) + * zserv.c: (zread_ipv4_add) send route to the correct routing table + * zebra_rib.c (static_install_ipv4) set routing table + 2006-07-02 Paul Jakma * rt_netlink.c: (netlink_interface_addr) Fix CID #104, can not diff --git a/zebra/connected.c b/zebra/connected.c index 736b40b0..44002e76 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -200,7 +200,7 @@ connected_up_ipv4 (struct interface *ifp, struct connected *ifc) if (prefix_ipv4_any (&p)) return; - rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, + rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, RT_TABLE_MAIN, ifp->metric, 0); rib_update (); diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 9851cf44..665e5673 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1482,6 +1482,7 @@ static_install_ipv4 (struct prefix *p, struct static_ipv4 *si) rib->distance = si->distance; rib->metric = 0; rib->nexthop_num = 0; + rib->table = zebrad.rtm_table_default; switch (si->type) { diff --git a/zebra/zserv.c b/zebra/zserv.c index 5b38fc19..1703d3f5 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -801,6 +801,8 @@ zread_ipv4_add (struct zserv *client, u_short length) if (CHECK_FLAG (message, ZAPI_MESSAGE_METRIC)) rib->metric = stream_getl (s); + /* Table */ + rib->table=zebrad.rtm_table_default; rib_add_ipv4_multipath (&p, rib); return 0; } -- cgit v1.2.1