History

netfilter: nft_meta: add pkttype support

Add pkttype support for ip, ipv6 and inet families of tables. This allows you to fetch the meta packet type based on the link layer information. The loopback traffic is a special case, the packet type is guessed from the network layer header. No special handling for bridge and arp since we're not going to see such traffic in the loopback interface. Joint work with Alvaro Neira Ayuso <alvaroneay@gmail.com>

Ana Rey committed 12 years ago

Commit e2a093f1 parent e91ded82 files · +30 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+2−0
@@ -571,6 +571,7 @@ enum nft_exthdr_attributes { · 570 unmodified lines
571571 * @NFT_META_L4PROTO: layer 4 protocol number
572572 * @NFT_META_BRI_IIFNAME: packet input bridge interface name
573573 * @NFT_META_BRI_OIFNAME: packet output bridge interface name
574+ * @NFT_META_PKTTYPE: packet type (skb->pkt_type), special handling for loopback
574575 */
575576 enum nft_meta_keys {
576577 NFT_META_LEN,
@@ -592,6 +593,7 @@ enum nft_meta_keys { · 15 unmodified lines
592593 NFT_META_L4PROTO,
593594 NFT_META_BRI_IIFNAME,
594595 NFT_META_BRI_OIFNAME,
596+ NFT_META_PKTTYPE,
595597 };
596598
597599 /**