From 4a8465a1f308890c7f54eab8c0a7c270fc0246ed Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Fri, 1 Feb 2013 00:56:04 +0100 Subject: Remove the default IPv4 netmask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A default netmask makes no sense (except possibly /32). Spotted by: Thomas Bächler --- docs/examples/ethernet-static | 3 +-- docs/netctl.profile.5.txt | 7 +++---- src/lib/ip | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/examples/ethernet-static b/docs/examples/ethernet-static index b346688..73e4e73 100644 --- a/docs/examples/ethernet-static +++ b/docs/examples/ethernet-static @@ -2,8 +2,7 @@ Description='A basic static ethernet connection' Interface=eth0 Connection=ethernet IP=static -# The netmask in the IPv4 address is optional and defaults to 24 -Address='192.168.1.23/28' +Address='192.168.1.23/24' #Routes=('192.168.0.0/24 via 192.168.1.2') Gateway='192.168.1.1' DNS=('192.168.1.1') diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt index 01b6256..3c0ff30 100644 --- a/docs/netctl.profile.5.txt +++ b/docs/netctl.profile.5.txt @@ -103,10 +103,9 @@ network. In particular, these connection types are +ethernet+, packages, which is blocked by `no'. 'Address=()' [requires 'IP=static']:: - An array of IP addresses, optionally suffixed with ``/`', - where netmask is an integer between 0 and 255. The default netmask - is 24. Leaving out brackets for arrays consisting of a single - element is accepted in the Bash syntax. + An array of IP addresses suffixed with ``/`'. + Leaving out brackets for arrays consisting of a single element is + accepted in the Bash syntax. 'Gateway=' [requires 'IP=static']:: An IP routing gateway address. diff --git a/src/lib/ip b/src/lib/ip index 5caa0fc..8723e5b 100644 --- a/src/lib/ip +++ b/src/lib/ip @@ -53,7 +53,6 @@ ip_set() { static) if [[ $Address ]]; then for addr in "${Address[@]}"; do - [[ $addr == */* ]] || addr+="/24" if ! do_debug ip addr add "$addr" brd + dev "$Interface"; then report_error "Could not add address '$addr' to interface '$Interface'" return 1 -- cgit v1.2.3-24-g4f1b