summaryrefslogtreecommitdiff
path: root/system-linux.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-12-11 10:54:37 +0100
committerSteven Barth <steven@midlink.org>2013-12-11 10:54:37 +0100
commit4106d0ced43327848791ed6182f28d461c01a4b8 (patch)
tree8216799da47b0f00d976485554a27501c0a81a54 /system-linux.c
parent93124d96594415563f68bda0ca24c3307e014efd (diff)
downloadnetifd-4106d0ced43327848791ed6182f28d461c01a4b8.tar.gz
IPv6: Remove IPv6 source-routing workaround (kernel is fixed)
Signed-off-by: Steven Barth <steven@midlink.org>
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/system-linux.c b/system-linux.c
index 714729f..7b3e08f 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -1142,6 +1142,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
struct rtmsg rtm = {
.rtm_family = (alen == 4) ? AF_INET : AF_INET6,
.rtm_dst_len = route->mask,
+ .rtm_src_len = route->sourcemask,
.rtm_table = (table < 256) ? table : RT_TABLE_UNSPEC,
.rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
.rtm_scope = scope,
@@ -1167,6 +1168,9 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
if (route->mask)
nla_put(msg, RTA_DST, alen, &route->addr);
+ if (route->sourcemask)
+ nla_put(msg, RTA_SRC, alen, &route->source);
+
if (route->metric > 0)
nla_put_u32(msg, RTA_PRIORITY, route->metric);