Skip to content

Commit 7504665

Browse files
committed
Uniform (lowercase) proto result fields
1 parent 1ecf3b3 commit 7504665

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Parse/Netstat.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ sub parse_netstat_win {
176176
or return [400, "Can't parse tcp line (#$i): $line"];
177177
$k = { %+ };
178178
$cur = 'tcp';
179+
for ($k->{proto}) { $_ = lc }
179180
push @conns, $k;
180181
} elsif ($line =~ /^\s*UDP\s/ && $udp) {
181182
# UDP 0.0.0.0:500 *:* 696
@@ -191,6 +192,7 @@ sub parse_netstat_win {
191192
or return [400, "Can't parse udp line (#$i): $line"];
192193
$k = { %+ };
193194
$cur = 'udp';
195+
for ($k->{proto}) { $_ = lc }
194196
push @conns, $k;
195197
} elsif ($cur) {
196198
$k->{execs} //= [];

0 commit comments

Comments
 (0)