From 412a9cd026ec2271f035f23e040ea01f59a76030 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Fri, 24 Jun 2016 01:35:16 -0500 Subject: Include interface scope on IPv6 static routes to link local gateway IPs. Ticket #6506 --- src/etc/inc/system.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 4f81d80..6e43c8d 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -745,6 +745,10 @@ function system_staticroutes_configure($interface = "", $update_dns = false) { if (is_subnet($ip)) { if (is_ipaddr($gatewayip)) { + if (is_linklocal($gatewayip) == "6" && !strpos($gatewayip, '%')) { + // add interface scope for link local v6 routes + $gatewayip .= "%$interfacegw"; + } mwexec($cmd . escapeshellarg($gatewayip)); if (isset($config['system']['route-debug'])) { $mt = microtime(); -- cgit v1.1