Skip to content

Commit d128e3c

Browse files
authored
Correct representation of IP addresses in plain and csv mode (hestiacp#3260)
* Correct representation of IP addresses in plain and csv mode * Adaptation func/main.sh for correct working with IPV6 addresses
1 parent db2363a commit d128e3c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/v-list-sys-ip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ shell_list() {
5959

6060
# PLAIN list function
6161
plain_list() {
62-
echo -ne "$IP\t$OWNER\t$STATUS\t$NAME\t$U_SYS_USERS\t$U_WEB_DOMAINS\t"
62+
echo -ne "$ip\t$OWNER\t$STATUS\t$NAME\t$U_SYS_USERS\t$U_WEB_DOMAINS\t"
6363
echo -e "$INTERFACE\t$NETMASK\t$NAT\t$TIME\t$DATE"
6464
}
6565

6666
# CSV list function
6767
csv_list() {
6868
echo -n "IP,OWNER,STATUS,NAME,U_SYS_USERS,U_WEB_DOMAINS,INTERFACE"
6969
echo "NETMASK,NAT,TIME,DATE"
70-
echo -n "$IP,$OWNER,$STATUS,$NAME,\"$U_SYS_USERS\",$U_WEB_DOMAINS,"
70+
echo -n "$ip,$OWNER,$STATUS,$NAME,\"$U_SYS_USERS\",$U_WEB_DOMAINS,"
7171
echo "$INTERFACE, $NETMASK,$NAT,$TIME,$DATE"
7272
}
7373

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ is_ip_format_valid() {
742742

743743
# IPv6 format validator
744744
is_ipv6_format_valid() {
745-
object_name=${2-ip6}
745+
object_name=${2-ipv6}
746746
ip_regex='([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])'
747747
t_ip=$(echo $1 | awk -F / '{print $1}')
748748
t_cidr=$(echo $1 | awk -F / '{print $2}')

0 commit comments

Comments
 (0)