summaryrefslogtreecommitdiff
path: root/accel-pppd/libnetlink/iputils.c
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2018-01-13 01:52:13 +0500
committerVladislav Grishenko <themiron@mail.ru>2018-01-13 02:07:41 +0500
commita9708f9bf8d7225d9fa137c7734ccc3cbc2121c3 (patch)
tree6015d54fd3ef49fea48419222b641d44e084bc26 /accel-pppd/libnetlink/iputils.c
parente25f03bf144dbe7121bc5710aafbd45f71215436 (diff)
downloadaccel-ppp-a9708f9bf8d7225d9fa137c7734ccc3cbc2121c3.tar.gz
accel-ppp-a9708f9bf8d7225d9fa137c7734ccc3cbc2121c3.zip
ipv6: fix host scope routes
Diffstat (limited to 'accel-pppd/libnetlink/iputils.c')
-rw-r--r--accel-pppd/libnetlink/iputils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c
index 9371633..7d20f67 100644
--- a/accel-pppd/libnetlink/iputils.c
+++ b/accel-pppd/libnetlink/iputils.c
@@ -556,7 +556,7 @@ int __export ip6route_add(int ifindex, struct in6_addr *dst, int pref_len, int p
req.n.nlmsg_type = RTM_NEWROUTE;
req.i.rtm_family = AF_INET6;
req.i.rtm_table = RT_TABLE_MAIN;
- req.i.rtm_scope = RT_SCOPE_LINK;
+ req.i.rtm_scope = (pref_len == 128) ? RT_SCOPE_HOST : RT_SCOPE_LINK;
req.i.rtm_protocol = proto;
req.i.rtm_type = RTN_UNICAST;
req.i.rtm_dst_len = pref_len;
@@ -592,7 +592,7 @@ int __export ip6route_del(int ifindex, struct in6_addr *dst, int pref_len)
req.n.nlmsg_type = RTM_DELROUTE;
req.i.rtm_family = AF_INET6;
req.i.rtm_table = RT_TABLE_MAIN;
- req.i.rtm_scope = RT_SCOPE_LINK;
+ req.i.rtm_scope = (pref_len == 128) ? RT_SCOPE_HOST : RT_SCOPE_LINK;
req.i.rtm_type = RTN_UNICAST;
req.i.rtm_dst_len = pref_len;