netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eelco Chaudron <echaudro@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] arp: Ignore packets with an all zero sender mac address
Date: Fri, 3 Nov 2017 11:39:04 +0100	[thread overview]
Message-ID: <cf78d039-acf2-76d1-becf-2672e63f2da3@redhat.com> (raw)
In-Reply-To: <20171027.224818.1467938250125086766.davem@davemloft.net>

On 27/10/17 15:48, David Miller wrote:
> From: Eelco Chaudron <echaudro@redhat.com>
> Date: Thu, 26 Oct 2017 10:37:01 +0200
>
>> Some applications/devices seem to forget their MAC address when
>> performing some kind of a failover which triggers (something that
>> looks like) a gratuities arp.
>>
>> The ARP packet looks something like this:
>>
>>    Address Resolution Protocol (reply)
>>        Hardware type: Ethernet (1)
>>        Protocol type: IPv4 (0x0800)
>>        Hardware size: 6
>>        Protocol size: 4
>>        Opcode: reply (2)
>>        Sender MAC address: 00:00:00:00:00:00
>>        Sender IP address: 10.0.0.1
>>        Target MAC address: 00:00:00:00:00:00
>>        Target IP address: 255.255.255.255
>>
>> This will result in existing arp entries being overwritten with an all
>> zero mac address. Until the arp entry times out this host can no
>> longer initiate a connection to this device.
>>
>> Checking for and ignoring invalid mac addresses will solve this
>> problem.
>>
>> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
> I really have trouble justifying this fully.
>
> I looked at a bunch of ARP implementations, and I see no special
> checks about the link level address other than to make sure it isn't
> "our" address.
>
> Whatever is generating these weird ARP packets should be fixed
> instead.
Looking for any mentioning of an all-zero MAC address being invalid, the 
only reference I could find was in the original first Xerox Wire 
Specification. The IEEE specifications do not mention this at all, and 
according to it, the all-zero address is a valid MA-L address assigned 
to Xerox.

Looking at the packet more, it might be an attempt to do an unARP (RFC 
1868) but forgot to implement to set the Hardware Address Length to zero.

I'm sure adding an arptables entry can be used to solve this instead, in 
case the offending device cannot be fixed.

Please ignore this patch...

Cheers,

Eelco

  reply	other threads:[~2017-11-03 10:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26  8:37 [PATCH net-next] arp: Ignore packets with an all zero sender mac address Eelco Chaudron
2017-10-27 13:48 ` David Miller
2017-11-03 10:39   ` Eelco Chaudron [this message]
2017-11-03 12:19     ` David Miller

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=cf78d039-acf2-76d1-becf-2672e63f2da3@redhat.com \
    --to=echaudro@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).