IPv6: Use source-routing to allow multi-wan
[project/netifd.git] / proto.c
diff --git a/proto.c b/proto.c
index 83c63451c139c265b8c160a58814789dc8331706..676852d8b05239cb76175e4f88857161868ac971 100644 (file)
--- a/proto.c
+++ b/proto.c
@@ -251,6 +251,12 @@ parse_gateway_option(struct interface *iface, struct blob_attr *attr, bool v6)
 
        route->mask = 0;
        route->flags = (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
+
+       if (v6) {
+               route->table = interface_ip_resolve_v6_rtable(iface->l3_dev.dev->ifindex);
+               route->flags |= DEVROUTE_SRCTABLE;
+       }
+
        vlist_add(&iface->proto_ip.route, &route->node, route);
 
        return true;