diff options
author | smos <seth.mos@dds.nl> | 2012-01-15 14:44:57 +0100 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-01-15 14:44:57 +0100 |
commit | a59c7fa63f5b1a3d75d17719322e455e01459610 (patch) | |
tree | 3c18eecca2f0199ccd679eda0601a3e5a3a2da90 | |
parent | 2d107ad5a9aa33d9ab5b35c90d57aa1fe11a83c8 (diff) | |
download | pfsense-a59c7fa63f5b1a3d75d17719322e455e01459610.zip pfsense-a59c7fa63f5b1a3d75d17719322e455e01459610.tar.gz |
Duplicate logic from gif tunnels for gre tunnels these are very similar
Fix for ticket #2077
-rw-r--r-- | etc/inc/interfaces.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 10e8d0d..3cc0027 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -777,7 +777,11 @@ function interface_gre_configure(&$gre, $grekey = "") { /* Do not change the order here for more see gre(4) NOTES section. */ mwexec("/sbin/ifconfig {$greif} tunnel {$realifip} {$gre['remote-addr']}"); - mwexec("/sbin/ifconfig {$greif} {$gre['tunnel-local-addr']} {$gre['tunnel-remote-addr']} netmask " . gen_subnet_mask($gre['tunnel-remote-net'])); + if((is_ipaddrv6($gre['tunnel-local-addr'])) || (is_ipaddrv6($gre['tunnel-remote-addr']))) { + mwexec("/sbin/ifconfig {$greif} inet6 {$gre['tunnel-local-addr']} {$gre['tunnel-remote-addr']} prefixlen /{$gre['tunnel-remote-net']} "); + } else { + mwexec("/sbin/ifconfig {$greif} {$gif['tunnel-local-addr']} {$gre['tunnel-remote-addr']} netmask " . gen_subnet_mask($gre['tunnel-remote-net'])); + } if (isset($gre['link0']) && $gre['link0']) pfSense_interface_flags($greif, IFF_LINK0); if (isset($gre['link1']) && $gre['link1']) |