diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-04-19 18:59:53 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-04-19 19:00:05 +0300 |
commit | b818ca056b96af851a92dcb77cac73426f035cd3 (patch) | |
tree | 535c1392a76d5b398960c58ad6802be6f289ebcf /main/opennhrp/fix-shortcut-route-table-2.patch | |
parent | 69f9c0126aad8b67e5ef8731337d2b901b143291 (diff) | |
download | aports-b818ca056b96af851a92dcb77cac73426f035cd3.tar.bz2 aports-b818ca056b96af851a92dcb77cac73426f035cd3.tar.xz |
main/opennhrp: additional routing-table fix
Diffstat (limited to 'main/opennhrp/fix-shortcut-route-table-2.patch')
-rw-r--r-- | main/opennhrp/fix-shortcut-route-table-2.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/main/opennhrp/fix-shortcut-route-table-2.patch b/main/opennhrp/fix-shortcut-route-table-2.patch new file mode 100644 index 0000000000..2e3c08cf37 --- /dev/null +++ b/main/opennhrp/fix-shortcut-route-table-2.patch @@ -0,0 +1,44 @@ +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; |