netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ralf@linux-mips.org
Cc: netdev@vger.kernel.org, thomas@osterried.de, linux-hams@vger.kernel.org
Subject: Re: [PATCH] NET: Fix /proc/net/arp for AX.25
Date: Mon, 13 Feb 2017 22:15:51 -0500 (EST)	[thread overview]
Message-ID: <20170213.221551.904691736246648194.davem@davemloft.net> (raw)
In-Reply-To: <20170210233857.GA13996@linux-mips.org>

From: Ralf Baechle <ralf@linux-mips.org>
Date: Sat, 11 Feb 2017 00:38:57 +0100

> When sending ARP requests over AX.25 links the hwaddress in the neighbour
> cache are not getting initialized.  For such an incomplete arp entry
> ax2asc2 will generate an empty string resulting in /proc/net/arp output
> like the following:
> 
> $ cat /proc/net/arp
> IP address       HW type     Flags       HW address            Mask     Device
> 192.168.122.1    0x1         0x2         52:54:00:00:5d:5f     *        ens3
> 172.20.1.99      0x3         0x0              *        bpq0
> 
> The missing field will confuse the procfs parsing of arp(8) resulting in
> incorrect output for the device such as the following:
> 
> $ arp
> Address                  HWtype  HWaddress           Flags Mask            Iface
> gateway                  ether   52:54:00:00:5d:5f   C                     ens3
> 172.20.1.99                      (incomplete)                              ens3
> 
> This changes the content of /proc/net/arp to:
> 
> $ cat /proc/net/arp
> IP address       HW type     Flags       HW address            Mask     Device
> 172.20.1.99      0x3         0x0         *                     *        bpq0
> 192.168.122.1    0x1         0x2         52:54:00:00:5d:5f     *        ens3
> 
> To do so it change ax2asc to put the string "*" in buf for a NULL address
> argument.  Finally the HW address field is left aligned in a 17 character
> field (the length of an ethernet HW address in the usual hex notation) for
> readability.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Applied, thanks Ralf.

      reply	other threads:[~2017-02-14  3:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 23:38 [PATCH] NET: Fix /proc/net/arp for AX.25 Ralf Baechle
2017-02-14  3:15 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170213.221551.904691736246648194.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-hams@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=thomas@osterried.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).