1072 |
1072 |
|
1073 |
1073 |
/* Do not change the order here for more see gre(4) NOTES section. */
|
1074 |
1074 |
if (is_ipaddrv6($gre['remote-addr'])) {
|
1075 |
|
mwexec("/sbin/ifconfig {$greif} inet6 tunnel {$realifip6} " . escapeshellarg($gre['remote-addr']));
|
|
1075 |
mwexec("/sbin/ifconfig " . escapeshellarg($greif) . " inet6 tunnel " . escapeshellarg($realifip6) . " " . escapeshellarg($gre['remote-addr']));
|
1076 |
1076 |
} else {
|
1077 |
|
mwexec("/sbin/ifconfig {$greif} tunnel {$realifip} " . escapeshellarg($gre['remote-addr']));
|
|
1077 |
mwexec("/sbin/ifconfig " . escapeshellarg($greif) . " tunnel " . escapeshellarg($realifip) . " " . escapeshellarg($gre['remote-addr']));
|
1078 |
1078 |
}
|
1079 |
1079 |
if (in_array($tunnel_type, array('v4', 'v4v6'))) {
|
1080 |
|
mwexec("/sbin/ifconfig {$greif} " . escapeshellarg($gre['tunnel-local-addr']) . " " . escapeshellarg($gre['tunnel-remote-addr']) . " netmask " . gen_subnet_mask($gre['tunnel-remote-net']));
|
|
1080 |
mwexec("/sbin/ifconfig " . escapeshellarg($greif) . " " . escapeshellarg($gre['tunnel-local-addr']) . " " . escapeshellarg($gre['tunnel-remote-addr']) . " netmask " . gen_subnet_mask($gre['tunnel-remote-net']));
|
1081 |
1081 |
}
|
1082 |
1082 |
if (in_array($tunnel_type, array('v6', 'v4v6'))) {
|
1083 |
1083 |
/* XXX: The prefixlen argument for tunnels of ipv6 is useless since it needs to be 128 as enforced by kernel */
|
1084 |
|
mwexec("/sbin/ifconfig {$greif} inet6 " . escapeshellarg($gre['tunnel-local-addr6']) . " " . escapeshellarg($gre['tunnel-remote-addr6']) . " prefixlen 128");
|
|
1084 |
mwexec("/sbin/ifconfig " . escapeshellarg($greif) . " inet6 " . escapeshellarg($gre['tunnel-local-addr6']) . " " . escapeshellarg($gre['tunnel-remote-addr6']) . " prefixlen 128");
|
1085 |
1085 |
}
|
1086 |
1086 |
|
1087 |
1087 |
$parentif = get_real_interface($gre['if']);
|
... | ... | |
1227 |
1227 |
|
1228 |
1228 |
/* Do not change the order here for more see gif(4) NOTES section. */
|
1229 |
1229 |
if (is_ipaddrv6($gif['remote-addr'])) {
|
1230 |
|
mwexec("/sbin/ifconfig {$gifif} inet6 tunnel {$realifip} " . escapeshellarg($gif['remote-addr']));
|
|
1230 |
mwexec("/sbin/ifconfig " . escapeshellarg($gifif) . " inet6 tunnel " . escapeshellarg($realifip) . " " . escapeshellarg($gif['remote-addr']));
|
1231 |
1231 |
} else {
|
1232 |
|
mwexec("/sbin/ifconfig {$gifif} tunnel {$realifip} " . escapeshellarg($gif['remote-addr']));
|
|
1232 |
mwexec("/sbin/ifconfig " . escapeshellarg($gifif) . " tunnel " . escapeshellarg($realifip) . " " . escapeshellarg($gif['remote-addr']));
|
1233 |
1233 |
}
|
1234 |
1234 |
if ((is_ipaddrv6($gif['tunnel-local-addr'])) || (is_ipaddrv6($gif['tunnel-remote-addr']))) {
|
1235 |
1235 |
/* XXX: The prefixlen argument for tunnels of ipv6 is useless since it needs to be 128 as enforced by kernel */
|
1236 |
1236 |
//mwexec("/sbin/ifconfig {$gifif} inet6 " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " prefixlen /" . escapeshellarg($gif['tunnel-remote-net']));
|
1237 |
|
mwexec("/sbin/ifconfig {$gifif} inet6 " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " prefixlen 128");
|
|
1237 |
mwexec("/sbin/ifconfig " . escapeshellarg($gifif) . " inet6 " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " prefixlen 128");
|
1238 |
1238 |
} else {
|
1239 |
|
mwexec("/sbin/ifconfig {$gifif} " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " netmask " . gen_subnet_mask($gif['tunnel-remote-net']));
|
|
1239 |
mwexec("/sbin/ifconfig " . escapeshellarg($gifif) . " " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " netmask " . gen_subnet_mask($gif['tunnel-remote-net']));
|
1240 |
1240 |
}
|
1241 |
1241 |
if (isset($gif['link1'])) {
|
1242 |
1242 |
pfSense_interface_flags($gifif, IFF_LINK1);
|
... | ... | |
1257 |
1257 |
}
|
1258 |
1258 |
if (is_numericint($gifmtu)) {
|
1259 |
1259 |
if ($gifmtu != $currentgifmtu) {
|
1260 |
|
mwexec("/sbin/ifconfig {$gifif} mtu {$gifmtu}");
|
|
1260 |
mwexec("/sbin/ifconfig " . escapeshellarg($gifif) . " mtu {$gifmtu}");
|
1261 |
1261 |
}
|
1262 |
1262 |
}
|
1263 |
1263 |
} else {
|
Improve GIF/GRE interface handling. Fixes #14549