aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/route.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 0f30ee3d94ea..f587a0e6cf34 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1403,6 +1403,9 @@ static struct rt6_info *rt6_add_route_info(struct in6_addr *prefix, int prefixle
1403 ipv6_addr_copy(&rtmsg.rtmsg_gateway, gwaddr); 1403 ipv6_addr_copy(&rtmsg.rtmsg_gateway, gwaddr);
1404 rtmsg.rtmsg_metric = 1024; 1404 rtmsg.rtmsg_metric = 1024;
1405 rtmsg.rtmsg_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | RTF_UP | RTF_PREF(pref); 1405 rtmsg.rtmsg_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | RTF_UP | RTF_PREF(pref);
1406 /* We should treat it as a default route if prefix length is 0. */
1407 if (!prefixlen)
1408 rtmsg.rtmsg_flags |= RTF_DEFAULT;
1406 rtmsg.rtmsg_ifindex = ifindex; 1409 rtmsg.rtmsg_ifindex = ifindex;
1407 1410
1408 ip6_route_add(&rtmsg, NULL, NULL, NULL); 1411 ip6_route_add(&rtmsg, NULL, NULL, NULL);