Commit 75a4a33d authored by Jondy Zhao's avatar Jondy Zhao

Fix 'ip -4 addr' command.

parent ed92f8eb
......@@ -541,6 +541,7 @@ if [[ $object == "link" ]] ; then
elif [[ $object == "addr" ]] ; then
if [[ $command == "add" ]] || [[ $command == "del" ]] ; then
mask=$(prefix_to_netmask $(basename $1))
address=$(dirname $1)
shift
elif [[ $command == "list" ]] ; then
......@@ -554,6 +555,7 @@ elif [[ $object == "addr" ]] ; then
if [[ "$opt_family" == "ipv4" || "$opt_family" == "" ]] ; then
ipcmd="netsh interface ip $command address"
address="$address $mask"
elif [[ "$opt_family" == "ipv6" ]] ; then
ipcmd="netsh interface ipv6 $command address"
else
......
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