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:35:52 -0500
commit8e8108e680357e65b9fa2916a8a4660cf316e91b (patch)
treeed867eeb6275bfda08bee3b33684bf8170aa533d
parent0bcda37b770afa12b019bf0299215f55dfef0e97 (diff)
downloadpfsense-8e8108e680357e65b9fa2916a8a4660cf316e91b.zip
pfsense-8e8108e680357e65b9fa2916a8a4660cf316e91b.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 d88544b..ffdfa5b 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