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:
Ossi Herrala 2012-02-06 14:43:21 +00:00 committed by Ossi Herrala
parent 1906368545
commit 9b2b56b53b
2 changed files with 5 additions and 2 deletions

View file

@ -230,7 +230,7 @@ define network::interface($ipaddr = "none", $eaddr = "none", $netmask = "none",
# $device:
# Interface to use for this route.
#
define network::route($gateway, $device, $ipv6gateway = "") {
define network::route($gateway = "", $device, $ipv6gateway = "") {
case $name {
"default": {
@ -283,6 +283,9 @@ define network::route($gateway, $device, $ipv6gateway = "") {
}
}
default: {
if ipv6gateway != "" {
fail("Custom IPv6 routes not supported yet.")
}
case $operatingsystem {
"fedora","centos": {
include network::helper::restart

View file

@ -1,3 +1,3 @@
ADDRESS0=<%= name.split('/')[0] %>
NETMASK0=<%= name.split('/')[1] %>
<% if gateway != "NONE" %>GATEWAY0=<%= gateway %><% end %>
<% if gateway != "" %>GATEWAY0=<%= gateway %><% end %>