summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-06-01 07:21:41 -0700
committerBen Pfaff <blp@ovn.org>2017-06-01 07:21:41 -0700
commit0b2c7e690a0ad1efda5487f828690db64133980e (patch)
tree6ab42ce058d52a668e1bd83e52765af06908c039 /utilities
parente2d12c07df97fc19c01f076be0a2bbb388e84c52 (diff)
downloadopenvswitch-0b2c7e690a0ad1efda5487f828690db64133980e.tar.gz
Replace most uses of and references to "ifconfig" by "ip".
It's becoming more common that OSes include "ip" but not "ifconfig", so it's best to avoid using the latter. This commit removes most references to "ifconfig" and replaces them by "ip". It also adds a build-time check to make it harder to introduce new uses of "ifconfig". There are important differences between "ifconfig" and "ip": - An "ifconfig" command that sets an IP address also brings the interface up, but a similar "ip addr add" command does not, so it is often necessary (or at least precautionary) to add an "ip link set <dev> up" command. - "ifconfig" can infer a netmask from an IP adddress, but "ip" always assumes /32 if none is given. - "ifconfig" with address 0.0.0.0 removes any configured IP address, but "ip addr add" does not, so "ifconfig <dev> 0.0.0.0" must be replaced by "ip addr del" or "ip addr flush". Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/bugtool/ovs-bugtool.in6
-rw-r--r--utilities/ovs-ofctl.8.in4
-rw-r--r--utilities/ovs-vsctl.8.in2
3 files changed, 6 insertions, 6 deletions
diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
index 506e42876..5eb3440b7 100755
--- a/utilities/bugtool/ovs-bugtool.in
+++ b/utilities/bugtool/ovs-bugtool.in
@@ -14,7 +14,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Copyright (c) 2005, 2007 XenSource Ltd.
-# Copyright (c) 2010, 2011, 2012, 2013, 2015, 2016 Nicira, Inc.
+# Copyright (c) 2010, 2011, 2012, 2013, 2015, 2016, 2017 Nicira, Inc.
#
# To add new entries to the bugtool, you need to:
@@ -137,7 +137,7 @@ DPKG_QUERY = 'dpkg-query'
ETHTOOL = 'ethtool'
FDISK = 'fdisk'
FIND = 'find'
-IFCONFIG = 'ifconfig'
+IP = 'ip'
IPTABLES = 'iptables'
ISCSIADM = 'iscsiadm'
LOSETUP = 'losetup'
@@ -582,7 +582,7 @@ exclude those logs from the archive.
file_output(CAP_NETWORK_CONFIG, [OPENVSWITCH_DEFAULT_SWITCH,
OPENVSWITCH_SYSCONFIG_SWITCH])
- cmd_output(CAP_NETWORK_INFO, [IFCONFIG, '-a'])
+ cmd_output(CAP_NETWORK_INFO, [IP, 'addr', 'show'])
cmd_output(CAP_NETWORK_INFO, [ROUTE, '-n'])
cmd_output(CAP_NETWORK_INFO, [ARP, '-n'])
cmd_output(CAP_NETWORK_INFO, [NETSTAT, '-an'])
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index 86f019fdb..3b86c0d73 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -136,8 +136,8 @@ may be any one of the following:
.RS
.IQ \fBup\fR
.IQ \fBdown\fR
-Enable or disable the interface. This is equivalent to \fBifconfig
-up\fR or \fBifconfig down\fR on a Unix system.
+Enable or disable the interface. This is equivalent to \fBip
+link set up\fR or \fBip link set down\fR on a Unix system.
.
.IP \fBstp\fR
.IQ \fBno\-stp\fR
diff --git a/utilities/ovs-vsctl.8.in b/utilities/ovs-vsctl.8.in
index 6aca267a7..e5e565e8a 100644
--- a/utilities/ovs-vsctl.8.in
+++ b/utilities/ovs-vsctl.8.in
@@ -600,7 +600,7 @@ access port for VLAN 10, and configure it with an IP address:
.IP
.B "ovs\-vsctl add\-port br0 vlan10 tag=10 \-\- set Interface vlan10 type=internal"
.IP
-.B "ifconfig vlan10 192.168.0.123"
+.B "ip addr add 192.168.0.123/24 dev vlan10"
.
.PP
Add a GRE tunnel port \fBgre0\fR to remote IP address 1.2.3.4 to