mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
ctdb-tests: Add 32-bit netmask support to "ip addr show" stub
In this case do not show broadcast address. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
8305c8d363
commit
47a68ff440
@ -214,12 +214,10 @@ ip_addr_show ()
|
||||
fi
|
||||
calc_brd ()
|
||||
{
|
||||
case "${local#*/}" in
|
||||
24)
|
||||
brd="${local%.*}.255"
|
||||
;;
|
||||
*)
|
||||
not_implemented "list ... fake bits other than 24: ${local#*/}"
|
||||
case "${local#*/}" in
|
||||
24) brd="${local%.*}.255" ;;
|
||||
32) brd="" ;;
|
||||
*) not_implemented "list ... fake bits other than 24/32: ${local#*/}"
|
||||
esac
|
||||
}
|
||||
show_iface()
|
||||
@ -236,14 +234,14 @@ ip_addr_show ()
|
||||
read local scope <"$pf"
|
||||
if [ -z "$_to" -o "${_to%/*}" = "${local%/*}" ] ; then
|
||||
calc_brd
|
||||
echo " inet ${local} brd ${brd} scope ${scope} ${dev}"
|
||||
echo " inet ${local} ${brd:+brd ${brd} }scope ${scope} ${dev}"
|
||||
fi
|
||||
fi
|
||||
if $secondary && [ -r "$sf" ] ; then
|
||||
while read local scope ; do
|
||||
if [ -z "$_to" -o "${_to%/*}" = "${local%/*}" ] ; then
|
||||
calc_brd
|
||||
echo " inet ${local} brd ${brd} scope ${scope} secondary ${dev}"
|
||||
echo " inet ${local} ${brd:+brd }${brd} scope ${scope} secondary ${dev}"
|
||||
fi
|
||||
done <"$sf"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user