summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-24 01:35:16 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-24 01:36:02 -0500
commit412a9cd026ec2271f035f23e040ea01f59a76030 (patch)
tree6bfd29a01e251a784a9bf66c1d784f8154080720
parent72a6e5d0719dff770af52d97be5bf187fc5f7312 (diff)
downloadpfsense-412a9cd026ec2271f035f23e040ea01f59a76030.zip
pfsense-412a9cd026ec2271f035f23e040ea01f59a76030.tar.gz
Include interface scope on IPv6 static routes to link local gateway IPs. Ticket #6506
-rw-r--r--src/etc/inc/system.inc4
1 files changed, 4 insertions, 0 deletions
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();
OpenPOWER on IntegriCloud