Subject: Re: [PATCH v2 2/4] arp: decompose is_garp logic into a separate function

From: Ihar Hrachyshka <[email-masked]>
Date: Wed, 24 May 2017 14:38:16 -0700

On 05/18/2017 01:49 PM, Julian Anastasov wrote:

> 	All 4 patches look ok to me with only a small problem
> which comes from patch already included in kernel. I see
> that GARP replies can not work for 1394, is_garp will be
> cleared. May be 'tha' check should be moved in if expression,
> for example:
>
> 	if (is_garp && ar_op == htons(ARPOP_REPLY) && tha)
> 		is_garp = !memcmp(tha, sha, dev->addr_len);

I can easily miss something substantial, so please correct me, but...

If it's of REPLY type, the RFC 2002 requires that target hardware 
address field equals to source address field for a packet to be 
considered gratuitous. Since IEEE 1394 ARP standard defines its payload 
without target field, it seems to me that there is no such thing as a 
gratuitous ARP reply for IEEE 1394. That's why I think resetting is_garp 
to 0 for those packets is justified.

Ihar