Change IPv4 gateway to empty string so IPv6 only default routes are
possible. Add fail when trying to set custom IPv6 routes. Someone will fix it someday when there's need.
This commit is contained in:
parent
1906368545
commit
9b2b56b53b
2 changed files with 5 additions and 2 deletions
|
@ -230,7 +230,7 @@ define network::interface($ipaddr = "none", $eaddr = "none", $netmask = "none",
|
||||||
# $device:
|
# $device:
|
||||||
# Interface to use for this route.
|
# Interface to use for this route.
|
||||||
#
|
#
|
||||||
define network::route($gateway, $device, $ipv6gateway = "") {
|
define network::route($gateway = "", $device, $ipv6gateway = "") {
|
||||||
|
|
||||||
case $name {
|
case $name {
|
||||||
"default": {
|
"default": {
|
||||||
|
@ -283,6 +283,9 @@ define network::route($gateway, $device, $ipv6gateway = "") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
if ipv6gateway != "" {
|
||||||
|
fail("Custom IPv6 routes not supported yet.")
|
||||||
|
}
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
"fedora","centos": {
|
"fedora","centos": {
|
||||||
include network::helper::restart
|
include network::helper::restart
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
ADDRESS0=<%= name.split('/')[0] %>
|
ADDRESS0=<%= name.split('/')[0] %>
|
||||||
NETMASK0=<%= name.split('/')[1] %>
|
NETMASK0=<%= name.split('/')[1] %>
|
||||||
<% if gateway != "NONE" %>GATEWAY0=<%= gateway %><% end %>
|
<% if gateway != "" %>GATEWAY0=<%= gateway %><% end %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue