aboutsummaryrefslogtreecommitdiffstats
path: root/main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-07-24 16:09:30 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-07-24 16:09:30 +0300
commit0df48acd155da7f5a1a6ed28ffa0c3d3624084a5 (patch)
tree5b9f28fb5973a49b7e8b8faada465ccf96644548 /main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch
parentdf1c822e76d712cb306e491fd652b5acb54acaa0 (diff)
downloadaports-0df48acd155da7f5a1a6ed28ffa0c3d3624084a5.tar.bz2
aports-0df48acd155da7f5a1a6ed28ffa0c3d3624084a5.tar.xz
main/opennhrp: cherry-pick upstream fixes
Diffstat (limited to 'main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch')
-rw-r--r--main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch b/main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch
new file mode 100644
index 0000000000..a68409fecf
--- /dev/null
+++ b/main/opennhrp/0004-netlink-additional-fixes-to-route-table-matching-fix.patch
@@ -0,0 +1,57 @@
+From a7288181001144b4d44c4265624828045b80f988 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Sat, 19 Apr 2014 19:13:04 +0300
+Subject: [PATCH] netlink: additional fixes to route-table matching (fix
+ previous commit)
+
+---
+ nhrp/sysdep_netlink.c | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/nhrp/sysdep_netlink.c b/nhrp/sysdep_netlink.c
+index 44063ad..74907bb 100644
+--- a/nhrp/sysdep_netlink.c
++++ b/nhrp/sysdep_netlink.c
+@@ -738,13 +738,15 @@ static void netlink_route_new(struct nlmsghdr *msg)
+ return;
+
+ if (iface->flags & NHRP_INTERFACE_FLAG_SHORTCUT_DEST) {
+- /* Local shortcut target routes */
+- if (rtm->rtm_table != iface->route_table)
++ /* Off-NBMA bound routes, include kernel subnet
++ * routes, and anything routing table. */
++ if (rtm->rtm_table != iface->route_table &&
++ rtm->rtm_protocol != RTPROT_KERNEL)
+ return;
+ type = NHRP_PEER_TYPE_LOCAL_ADDR;
+ } else if (iface->flags & NHRP_INTERFACE_FLAG_CONFIGURED) {
+- /* Routes which might get additional outbound
+- * shortcuts */
++ /* In-NBMA bound routes, include only specifed table
++ * and only non-kernel created routes */
+ if (rtm->rtm_table != iface->route_table ||
+ rtm->rtm_protocol == RTPROT_KERNEL)
+ return;
+@@ -792,13 +794,15 @@ static void netlink_route_del(struct nlmsghdr *msg)
+ return;
+
+ if (iface->flags & NHRP_INTERFACE_FLAG_SHORTCUT_DEST) {
+- /* Local shortcut target routes */
+- if (rtm->rtm_table != RT_TABLE_MAIN)
++ /* Off-NBMA bound routes, include kernel subnet
++ * routes, and anything routing table. */
++ if (rtm->rtm_table != iface->route_table &&
++ rtm->rtm_protocol != RTPROT_KERNEL)
+ return;
+ type = NHRP_PEER_TYPE_LOCAL_ADDR;
+ } else if (iface->flags & NHRP_INTERFACE_FLAG_CONFIGURED) {
+- /* Routes which might get additional outbound
+- * shortcuts */
++ /* In-NBMA bound routes, include only specifed table
++ * and only non-kernel created routes */
+ if (rtm->rtm_table != iface->route_table ||
+ rtm->rtm_protocol == RTPROT_KERNEL)
+ return;
+--
+2.4.6
+