netfilter: add generic ARP packet logger
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 20 Jun 2014 18:36:23 +0000 (20:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 27 Jun 2014 11:20:38 +0000 (13:20 +0200)
commit35b9395104d51f4b85847fa72a1bf4136d36c56e
tree7d3e26af1af9a9050b1c5b4faa07419ee2d00ef7
parentfab4085f4e248b8a80bb1dadbbacb2bacd8017c3
netfilter: add generic ARP packet logger

This adds the generic plain text packet loggger for ARP packets. It is
based on the ebt_log code. Nevertheless, the output has been modified
to make it consistent with the original xt_LOG output.

This is an example output:

IN=wlan0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=2 MACSRC=00:ab:12:34:55:63 IPSRC=192.168.10.1 MACDST=80:09:12:70:4f:50 IPDST=192.168.10.150

This patch enables packet logging from ARP chains, eg.

  nft add rule arp filter input log prefix "input: "

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/Makefile
net/ipv4/netfilter/nf_log_arp.c [new file with mode: 0644]