diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-12 19:36:19 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-12 19:36:19 +0000 |
commit | e96857cb51291f95ec5e6454576b177d8f721f54 (patch) | |
tree | fc07652cb9fd0855eca867b1e7e3cc1aa885cdc3 | |
parent | 4c51385c0033c9b0642af51ed0f05d4d25cc0f20 (diff) | |
download | drakx-net-e96857cb51291f95ec5e6454576b177d8f721f54.tar drakx-net-e96857cb51291f95ec5e6454576b177d8f721f54.tar.gz drakx-net-e96857cb51291f95ec5e6454576b177d8f721f54.tar.bz2 drakx-net-e96857cb51291f95ec5e6454576b177d8f721f54.tar.xz drakx-net-e96857cb51291f95ec5e6454576b177d8f721f54.zip |
adapt to drakxtools-13.92+ API change which fixes mgaapplet crashing on major
perl live upgrade, thus reducing the amount of resident memory used by
net_applet by not loading so much useless perl modules
(regression introduced when adding support for reading routes with
kernel-2.6.38+)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/network/tools.pm | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -1,3 +1,5 @@ +- adapt to drakxtools-13.92+ API change + (reduces net_applet resident memory) - drakfirewall: list SSL flavor of POP3/IMAP/SMTP ports 1.3: diff --git a/lib/network/tools.pm b/lib/network/tools.pm index de8261d..04bd343 100644 --- a/lib/network/tools.pm +++ b/lib/network/tools.pm @@ -264,8 +264,7 @@ sub host_hex_to_dotted { sub get_routes() { my %routes; my @routes = cat_("/proc/net/route"); - require any; - @routes = reverse(@routes) if any::cmp_kernel_versions(c::kernel_version(), "2.6.39") >= 0; + @routes = reverse(@routes) if common::cmp_kernel_versions(c::kernel_version(), "2.6.39") >= 0; foreach (@routes) { if (/^(\S+)\s+([0-9A-F]+)\s+([0-9A-F]+)\s+[0-9A-F]+\s+\d+\s+\d+\s+(\d+)\s+([0-9A-F]+)/) { if (defined $3) { $routes{$1}{gateway} = hex($3) ? host_hex_to_dotted($3) : $routes{$1}{network} } |