mrd6: adopted from packages-feed
[feed/routing.git] / mrd6 / patches / 101-Accept-default-routes-without-RTA_DST.patch
diff --git a/mrd6/patches/101-Accept-default-routes-without-RTA_DST.patch b/mrd6/patches/101-Accept-default-routes-without-RTA_DST.patch
new file mode 100644 (file)
index 0000000..660e707
--- /dev/null
@@ -0,0 +1,34 @@
+From b70c7d519ddd178b76d89bca7d3fe1fd186af862 Mon Sep 17 00:00:00 2001
+From: Oryon <pierre@darou.fr>
+Date: Tue, 11 Mar 2014 12:12:07 +0100
+Subject: [PATCH 1/2] Accept default routes without RTA_DST
+
+---
+ src/linux/linux_unicast_route.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/linux/linux_unicast_route.cpp b/src/linux/linux_unicast_route.cpp
+index 331a7a0..7919cc2 100644
+--- a/src/linux/linux_unicast_route.cpp
++++ b/src/linux/linux_unicast_route.cpp
+@@ -334,7 +334,7 @@ void linux_unicast_router::handle_route_event(bool isnew, nlmsghdr *hdr) {
+       netlink_msg::parse_rtatable(tb, RTA_MAX, RTM_RTA(NLMSG_DATA(hdr)),
+                               hdr->nlmsg_len - NLMSG_LENGTH(sizeof(rtmsg)));
+-      if (tb[RTA_DST]) {
++      //if (tb[RTA_DST]) { /* Accept default routes */
+               lookup_result res;
+               parse_prefix_rec(tb, msg->r.rtm_dst_len,
+@@ -360,7 +360,7 @@ void linux_unicast_router::handle_route_event(bool isnew, nlmsghdr *hdr) {
+               }
+               prefix_changed(isnew, res);
+-      }
++      //}
+ }
+ void linux_unicast_router::handle_intf_event(bool isnew, nlmsghdr *hdr) {
+-- 
+1.9.0
+