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
571 * @NFT_META_L4PROTO: layer 4 protocol number571 * @NFT_META_L4PROTO: layer 4 protocol number
572 * @NFT_META_BRI_IIFNAME: packet input bridge interface name572 * @NFT_META_BRI_IIFNAME: packet input bridge interface name
573 * @NFT_META_BRI_OIFNAME: packet output bridge interface name573 * @NFT_META_BRI_OIFNAME: packet output bridge interface name
574 * @NFT_META_PKTTYPE: packet type (skb->pkt_type), special handling for loopback
574 */575 */
575enum nft_meta_keys {576enum nft_meta_keys {
576 NFT_META_LEN,577 NFT_META_LEN,
@@ -592,6 +593,7 @@ enum nft_meta_keys { · 15 unmodified lines
592 NFT_META_L4PROTO,593 NFT_META_L4PROTO,
593 NFT_META_BRI_IIFNAME,594 NFT_META_BRI_IIFNAME,
594 NFT_META_BRI_OIFNAME,595 NFT_META_BRI_OIFNAME,
596 NFT_META_PKTTYPE,
595};597};
596 598
597/**599/**