Bläddra i källkod

IPV6: Adaptation of mask representation by network listing

asmcc 3 år sedan
förälder
incheckning
62ad31a52c
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      bin/v-delete-sys-ip
  2. 1 1
      bin/v-list-network

+ 1 - 1
bin/v-delete-sys-ip

@@ -77,7 +77,7 @@ else
 fi
 
 host_ip_check=$(hostname -i | sed -ne "/$ip46/p") # check, if IP address is main (listed in /etc/hosts)
-interface=$($BIN/v-list-network plain | sed -ne "/$ip46/s/$ip46[ \t]*[0-9]*[ \t]*\(.*\)/\1/p") # interface for IP address
+interface=$($BIN/v-list-network plain | sed -ne "/$ip46/s/$ip46[ \t]*\/[0-9]*[ \t]*\(.*\)/\1/p") # interface for IP address
 number_of_ips=$(/sbin/ip${check_ip_par} addr | grep -c global) # number of global system IP addresses
 
 if [[ ( -n "$host_ip_check" && -n "$interface" ) || ( $number_of_ips -eq 1 ) ]]; then

+ 1 - 1
bin/v-list-network

@@ -17,7 +17,7 @@ function list_network() {
 	ii=1
 	[ -n "$ip_type" ] && [ $ip_type -ne 4 -a $ip_type -ne 6 ] && ip_type=""
 	[ -n "$ip_type" ] && ip_filter=" -$ip_type"
-	ip_raw_string="$(/sbin/ip$ip_filter addr show scope global | sed -ne '/^[0-9]*\:/{h;d};G;s/^\(.*\)\n[0-9]*:\(.*\)/\1 \2/;/inet/s/[ \t]*inet[6]* \([0-9A-Fa-f.:]*\)\/\([0-9]*\).* \([0-9a-z]*\):[ \t]<.*>.*/\1 \2 \3/p')"
+	ip_raw_string="$(/sbin/ip$ip_filter addr show scope global | sed -ne '/^[0-9]*\:/{h;d};G;s/^\(.*\)\n[0-9]*:\(.*\)/\1 \2/;/inet/s/[ \t]*inet[6]* \([0-9A-Fa-f.:]*\)\/\([0-9]*\).* \([0-9a-z]*\):[ \t]<.*>.*/\1 \/\2 \3/p')"
 	ip_count=$(echo "$ip_raw_string" | wc -l)
 	case $ip_view in
 	shell)