Commit 3cb27991 authored by Gao Feng's avatar Gao Feng Committed by Pablo Neira Ayuso

netfilter: log_arp: Use ARPHRD_ETHER instead of literal '1'

There is one macro ARPHRD_ETHER which defines the ethernet proto for ARP,
so we could use it instead of the literal number '1'.
Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent ad66713f
...@@ -62,7 +62,7 @@ static void dump_arp_packet(struct nf_log_buf *m, ...@@ -62,7 +62,7 @@ static void dump_arp_packet(struct nf_log_buf *m,
/* If it's for Ethernet and the lengths are OK, then log the ARP /* If it's for Ethernet and the lengths are OK, then log the ARP
* payload. * payload.
*/ */
if (ah->ar_hrd != htons(1) || if (ah->ar_hrd != htons(ARPHRD_ETHER) ||
ah->ar_hln != ETH_ALEN || ah->ar_hln != ETH_ALEN ||
ah->ar_pln != sizeof(__be32)) ah->ar_pln != sizeof(__be32))
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment