]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix the gateway to the route interface for IPv6 routes.
authorRoy Marples <roy@marples.name>
Sat, 6 Aug 2016 23:00:50 +0000 (23:00 +0000)
committerRoy Marples <roy@marples.name>
Sat, 6 Aug 2016 23:00:50 +0000 (23:00 +0000)
Thanks to Guy Yur.

if-bsd.c

index bc47346160d5dce7e8bd4faea9d487b671e2e144..56ef1fd1d300afcb1f4a18ae80e0e009009e9ec4 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -1143,8 +1143,10 @@ if_route6(unsigned char cmd, const struct rt6 *rt)
 
        if (IN6_IS_ADDR_UNSPECIFIED(&rt->gate))
                g = NULL;
-       else
+       else {
                g = &gate;
+               ifa_scope(g, rt->iface->index);
+       }
 
        return if_rtmsg(cmd, rt->iface, addrs, flags,
 #ifdef RTP_CONNECTED