Package: net-acct
Version: 0.71-7
The example script sl2rdbl seems to have a bug which inhibits the
display of any from or to ports in some cases if the port is not
"well known" in /etc/services.
Why is "$port" placed into these "()"?
Current output:
eth0 tcp I I 1242 -> www local -> server
eth0 tcp I I 602 www -> server -> local
eth0 udp I I 1234 -> server -> local
It should read:
eth0 tcp I I 1242 1538 -> www local -> server
eth0 tcp I I 602 www -> 4627 server -> local
eth0 udp I I 1234 2344 -> 3456 server -> local
(Simulated)
Patch:
# diff -Naur /usr/share/doc/net-acct/examples/sl2rdbl ./sl2rdbl
--- /usr/share/doc/net-acct/examples/sl2rdbl 2004-09-07
/08:30:34.000000000 +0200
+++ ./sl2rdbl 2003-10-09 16:00:17.000000000 +0200
@@ -46,14 +47,14 @@
if($proto eq 'udp')
{
- if(!(($port1) = $udp[$x_fromport])) {$port1 = $x_fromport;};
- if(!(($port2) = $udp[$x_toport])) {$port2 = $x_toport;};
+ if(!(($port1 = $udp[$x_fromport]))) {$port1 = $x_fromport;};
+ if(!(($port2 = $udp[$x_toport]))) {$port2 = $x_toport;};
}
elsif($proto eq 'tcp')
{
- if(!(($port1) = $tcp[$x_fromport])) {$port1 = $x_fromport;};
- if(!(($port2) = $tcp[$x_toport])) {$port2 = $x_toport;};
+ if(!(($port1 = $tcp[$x_fromport]))) {$port1 = $x_fromport;};
+ if(!(($port2= $tcp[$x_toport]))) {$port2 = $x_toport;};
}
else
{
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]