From: Igor Maravic <[email protected]>

When the route doesn't have the specified gateway or nexthop it's scope should 
be link(RT_SCOPE_LINK).
Otherwise it should be global(RT_SCOPE_UNIVERSE).

Referenced from iproute2.

Signed-off-by: Igor Maravic <[email protected]>
---
 .../fibconfig_entry_set_netlink_socket.cc          |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git 
a/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_netlink_socket.cc 
b/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_netlink_socket.cc
index 5437cf0..b367469 100644
--- a/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_netlink_socket.cc
+++ b/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_netlink_socket.cc
@@ -201,7 +201,7 @@ FibConfigEntrySetNetlinkSocket::add_entry(const FteX& fte)
     rtmsg->rtm_src_len = 0;
     rtmsg->rtm_tos = 0;
     rtmsg->rtm_protocol = RTPROT_XORP;         // Mark this as a XORP route
-    rtmsg->rtm_scope = RT_SCOPE_UNIVERSE;
+    rtmsg->rtm_scope = RT_SCOPE_LINK;
     rtmsg->rtm_type = RTN_UNICAST;
     rtmsg->rtm_flags = RTM_F_NOTIFY;
 
@@ -248,6 +248,7 @@ FibConfigEntrySetNetlinkSocket::add_entry(const FteX& fte)
        data = static_cast<uint8_t*>(RTA_DATA(rtattr));
        fte.nexthop().copy_out(data);
        nlh->nlmsg_len = NLMSG_ALIGN(nlh->nlmsg_len) + rta_len;
+       rtmsg->rtm_scope = RT_SCOPE_UNIVERSE;
     }
 
     // Get the interface index, if it exists
-- 
1.7.5.4

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to