]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: meta: add support for setting skb->pkttype
authorFlorian Westphal <fw@strlen.de>
Thu, 10 Dec 2015 17:04:07 +0000 (18:04 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 18 Dec 2015 13:12:56 +0000 (14:12 +0100)
commit0050863657ff02040899fe061b9eb66cebffa371
treeb45a5994f419f696c3dbd3bde26a74a1ee7845e6
parenteb18b67bf7dfbaca26d93564a1626775b83f6585
netfilter: meta: add support for setting skb->pkttype

This allows to redirect bridged packets to local machine:

ether type ip ether daddr set aa:53:08:12:34:56 meta pkttype set unicast
Without 'set unicast', ip stack discards PACKET_OTHERHOST skbs.

It is also useful to add support for a '-m cluster like' nft rule
(where switch floods packets to several nodes, and each cluster node
 node processes a subset of packets for load distribution).

Mangling is restricted to HOST/OTHER/BROAD/MULTICAST, i.e. you cannot set
skb->pkt_type to PACKET_KERNEL or change PACKET_LOOPBACK to PACKET_HOST.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_meta.c