From cc48b5ef34849a2daa5645841f618d389c8179b0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 27 Apr 2015 06:33:30 -0400 Subject: fix displaying MAC for hidden network (mga13685) ESSID is bogus when the card fails to detect it's hidden... --- NEWS | 1 + lib/network/monitor.pm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b8afd4b..151db66 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- fix displaying bogus ESSID for hidden network (mga13685) - use high res icons for notifications (mga#7434) 2.17 diff --git a/lib/network/monitor.pm b/lib/network/monitor.pm index b06bbe3..43edb29 100644 --- a/lib/network/monitor.pm +++ b/lib/network/monitor.pm @@ -97,7 +97,9 @@ sub list_wireless { $has_key = $has_wpa = $has_eap = undef; } /Address: (.*)/ and $net->{ap} = lc($1); - /ESSID:"(.*?)"/ and $net->{essid} = $1; + if (my ($essid) = /ESSID:"(.*?)"/) { + $essid !~ /^\\x00/ and $net->{essid} = $essid; + } /Mode:(\S*)/ and $net->{mode} = $1; $net->{mode} = 'Managed' if $net->{mode} eq 'Master'; $_ =~ $quality_match and $net->{signal_strength} = $eval_quality->($1); -- cgit v1.2.1