Package: net-tools
Version: 1.60-17
Followup-For: Bug #197282

Hi,

I'm amazed nobody replied to this bug for 3.5 years already!
I discovered myself the problem and I could get a behaviour closer
to the expectations by applying those changes:

--- inet.c.orig 2006-12-28 19:00:45.000000000 +0100
+++ inet.c      2006-12-28 18:57:37.000000000 +0100
@@ -159,16 +159,11 @@
 #ifdef DEBUG
     fprintf (stderr, "rresolve: %08lx, mask %08x, num %08x \n", ad, netmask, 
numeric);
 #endif
-    if (ad == INADDR_ANY) {
-       if ((numeric & 0x0FFF) == 0) {
-           if (numeric & 0x8000)
-               safe_strncpy(name, "default", len);
-           else
-               safe_strncpy(name, "*", len);
-           return (0);
-       }
+    if (ad == INADDR_ANY && ! (numeric & 0x0004)) {
+       safe_strncpy(name, "*", len);
+       return (0);
     }
-    if (numeric & 0x0FFF) {
+    if (numeric & 0x0004) {
         safe_strncpy(name, inet_ntoa(sin->sin_addr), len);
        return (0);
     }

At least when calling netstat --numeric-ports we now get 
tcp        0      0 my.machine.com:139             *:*                     
LISTEN 
and netstat --numeric-hosts:
tcp        0      0 127.0.0.1:imap2         0.0.0.0:*               LISTEN    

But
- I don't know what is the supposed usage of "default" vs "*" for anycasts
- When I see how wrong the interpretation of the "numeric" flags
is in this part of the code I'm wondering for the whole stuff...

Phil

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages net-tools depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries

net-tools recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to