diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-03-30 09:19:11 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-03-30 09:19:11 +0300 |
commit | 8ab866f1ba6dd836a4c4e45545360c9e1a373035 (patch) | |
tree | 56bcf37cf5ab7771e9d6c029a6ef6085b785f255 /main | |
parent | e801e98a158ce3a191fc758f00ee306b97f19ff6 (diff) | |
download | aports-8ab866f1ba6dd836a4c4e45545360c9e1a373035.tar.bz2 aports-8ab866f1ba6dd836a4c4e45545360c9e1a373035.tar.xz |
main/opennhrp: add the forgotten patch
Diffstat (limited to 'main')
-rw-r--r-- | main/opennhrp/0001-netlink-ignore-kernel-routes-for-GRE-interfaces.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/main/opennhrp/0001-netlink-ignore-kernel-routes-for-GRE-interfaces.patch b/main/opennhrp/0001-netlink-ignore-kernel-routes-for-GRE-interfaces.patch new file mode 100644 index 0000000000..78cf3f89b4 --- /dev/null +++ b/main/opennhrp/0001-netlink-ignore-kernel-routes-for-GRE-interfaces.patch @@ -0,0 +1,54 @@ +From 7747c86253114ed9702346a93587e4e6cac444aa Mon Sep 17 00:00:00 2001 +From: David Ward <david.ward@ll.mit.edu> +Date: Tue, 29 Mar 2011 22:43:03 -0400 +Subject: [PATCH] netlink: ignore kernel routes for GRE interfaces + +The kernel route should not be added as a peer, except on shortcut- +destination interfaces. It can prevent NHRP resolution requests from +being routed correctly to a statically-configured next hop server. + +Signed-off-by: David Ward <david.ward@ll.mit.edu> +--- + nhrp/sysdep_netlink.c | 9 ++++----- + 1 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/nhrp/sysdep_netlink.c b/nhrp/sysdep_netlink.c +index a76acc2..e3e588b 100644 +--- a/nhrp/sysdep_netlink.c ++++ b/nhrp/sysdep_netlink.c +@@ -691,7 +691,8 @@ static void netlink_route_new(struct nlmsghdr *msg) + } else if (iface->flags & NHRP_INTERFACE_FLAG_CONFIGURED) { + /* Routes which might get additional outbound + * shortcuts */ +- if (rtm->rtm_table != iface->route_table) ++ if (rtm->rtm_table != iface->route_table || ++ rtm->rtm_protocol == RTPROT_KERNEL) + return; + type = NHRP_PEER_TYPE_LOCAL_ROUTE; + } +@@ -728,12 +729,9 @@ static void netlink_route_del(struct nlmsghdr *msg) + if (rta[RTA_OIF] == NULL || rta[RTA_DST] == NULL) + return; + +- /* Consider only routes from main table */ + if (rtm->rtm_family != PF_INET) + return; + +- /* Only consider routes for local interfaces that accept +- * shortcut connections */ + iface = nhrp_interface_get_by_index(*(int*)RTA_DATA(rta[RTA_OIF]), + FALSE); + if (iface == NULL) +@@ -747,7 +745,8 @@ static void netlink_route_del(struct nlmsghdr *msg) + } else if (iface->flags & NHRP_INTERFACE_FLAG_CONFIGURED) { + /* Routes which might get additional outbound + * shortcuts */ +- if (rtm->rtm_table != iface->route_table) ++ if (rtm->rtm_table != iface->route_table || ++ rtm->rtm_protocol == RTPROT_KERNEL) + return; + type = NHRP_PEER_TYPE_LOCAL_ROUTE; + } +-- +1.7.1 + |