From 5156a472be6b5d587fc509ad11f0ec684ac224e6 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Wed, 16 Aug 2023 13:48:54 +0300 Subject: [PATCH] Fix a bug in regex to correctly grep wack [build] https://sourceforge.net/p/webadmin/discussion/55377/thread/78e5aa05f3 --- net/linux-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/linux-lib.pl b/net/linux-lib.pl index b17de5d45..f3d0d9910 100755 --- a/net/linux-lib.pl +++ b/net/linux-lib.pl @@ -57,7 +57,7 @@ if (&has_command("ip")) { $ifc{'address'} = $1; $ifc{'netmask'} = &prefix_to_mask("$3"); } - elsif ($l =~ /\sinet\s+([0-9\.]+)\/\d+\s+(?:metric\s+\d+\s+|)brd\s+(\S+)\s+scope\s+global(?:\s+secondary|)\s(dynamic)\s+.*?(\Q$iface_name\E)/) { + elsif ($l =~ /\sinet\s+([0-9\.]+)\/(\d+)\s+(?:metric\s+\d+\s+|)brd\s+(\S+)\s+scope\s+global(?:\s+secondary|)\s(dynamic)\s+.*?(\Q$iface_name\E)/) { # Line like : # inet 193.9.101.120/24 brd 193.9.101.255 scope global secondary dynamic br0 # inet 10.211.55.81/24 metric 100 brd 10.211.55.255 scope global secondary dynamic enp0s5