[patch] Re: 2.3.99-pre8 oddity (please CC: me)

From: David Ford (david@kalifornia.com)
Date: Fri May 19 2000 - 02:02:36 EDT

  • Next message: Kees Bakker: "Version naming, can we have 2.3.100 please, was Re: 2.3.99-pre9 ?"

    Wang Jian wrote:

    > Hello ,
    >
    > When I test pppoe, I find an oddity about /proc/net/arp
    >
    > [lark@linux1 net]$ cat arp
    > IP address HW type Flags HW address Mask Device
    > 192.168.0.254 0x1 0x2 00:10:5A:5C:18:34 * eth0
    > 192.168.0.21 0x1 0x2 00:50:DA:B2:04:F9 * eth0
    > 192.168.0.1290x1 0xc 00:00:00:00:00:00 * eth0
    >
    > So I can't use arp -a to see it.

    Here's the patch. Linus, please apply to current tree.

    -d


    --- linux/net/ipv4/arp.c~ Wed Apr 26 12:13:17 2000
    +++ linux/net/ipv4/arp.c Thu May 18 22:28:29 2000
    @@ -1021,6 +1021,7 @@
             char hbuffer[HBUFFERLEN];
             int i,j,k;
             const char hexbuf[] = "0123456789ABCDEF";
    + char abuf[16];
     
             size = sprintf(buffer,"IP address HW type Flags HW address Mask Device\n");
     
    @@ -1059,20 +1060,15 @@
                     }
     #endif
     
    - {
    - char tbuf[16];
    - sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key));
    -
    - size = sprintf(buffer+len, "%-16s 0x%-10x0x%-10x%s",
    - tbuf,
    - hatype,
    - arp_state_to_flags(n),
    - hbuffer);
    -
    - size += sprintf(buffer+len+size,
    - " %-8s %s\n",
    - "*", dev->name);
    - }
    + size = sprintf(buffer+len, "%-16s 0x%-10x0x%-10x%s",
    + in_ntoa2(*(u32*)n->primary_key, abuf),
    + hatype,
    + arp_state_to_flags(n),
    + hbuffer);
    +
    + size += sprintf(buffer+len+size,
    + " %-8s %s\n",
    + "*", dev->name);
     
                             read_unlock(&n->lock);
     
    @@ -1096,13 +1092,13 @@
                             int hatype = dev ? dev->type : 0;
     
                             size = sprintf(buffer+len,
    - "%u.%u.%u.%u0x%-10x0x%-10x%s",
    - NIPQUAD(*(u32*)n->key),
    + "%-16s 0x%-10x0x%-10x%s",
    + in_ntoa2(*(u32*)n->key, abuf),
                                     hatype,
                                      ATF_PUBL|ATF_PERM,
                                     "00:00:00:00:00:00");
                             size += sprintf(buffer+len+size,
    - " %-17s %s\n",
    + " %-8s %s\n",
                                      "*", dev ? dev->name : "*");
     
                             len += size;

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Fri May 19 2000 - 03:15:12 EDT