Commit a6480fc6 authored by Gurucharan Shetty's avatar Gurucharan Shetty

ovs-save: Handle different 'ip addr show' output.

On RHEL 7.4 (with iproute-3.10.0-87), a DHCP provided
ipv4 address has the "dynamic" keyword set. For e.g
"ip addr show breth0 | grep inet" shows:

    inet brd scope global dynamic breth0
    inet6 fe80::250:56ff:fea8:fdf0/64 scope link

The keyword "dynamic" (according to 'man ip-address') is only
used for ipv6, but in this case this is not true. Our current
code will skip the ipv4 address restoration because of this.

With this commit, we special case "dynamic" keyword to be valid
in case of ipv4.

VMware-BZ: #1982196
Signed-off-by: default avatarGurucharan Shetty <>
Acked-by: default avatarYi-Hung Wei <>
parent 01d63028
......@@ -329,6 +329,14 @@ move_ip_address () {
while test $# != 0; do
case $1 in
# XXX: According to 'man ip-address', "dynamic" is only
# used for ipv6 addresses. But, atleast on RHEL 7.4
# (iproute-3.10.0-87), it is being used for ipv4
# addresses assigned with dhcp.
if [ "$family" = "inet" ]; then
# Omit kernel-maintained route.
continue 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment