linux-stable/include/uapi/linux/netfilter
Harout Hedeshian 01555e74bd netfilter: xt_socket: add XT_SOCKET_RESTORESKMARK flag
xt_socket is useful for matching sockets with IP_TRANSPARENT and
taking some action on the matching packets. However, it lacks the
ability to match only a small subset of transparent sockets.

Suppose there are 2 applications, each with its own set of transparent
sockets. The first application wants all matching packets dropped,
while the second application wants them forwarded somewhere else.

Add the ability to retore the skb->mark from the sk_mark. The mark
is only restored if a matching socket is found and the transparent /
nowildcard conditions are satisfied.

Now the 2 hypothetical applications can differentiate their sockets
based on a mark value set with SO_MARK.

iptables -t mangle -I PREROUTING -m socket --transparent \
                                           --restore-skmark -j action
iptables -t mangle -A action -m mark --mark 10 -j action2
iptables -t mangle -A action -m mark --mark 11 -j action3

Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2015-06-18 13:05:09 +02:00
..
ipset netfilter: ipset: Fix coding styles reported by checkpatch.pl 2015-06-14 10:40:18 +02:00
Kbuild netfilter: introduce l2tp match extension 2014-01-09 21:36:39 +01:00
nf_conntrack_common.h netfilter: add nftables 2013-10-14 17:15:48 +02:00
nf_conntrack_ftp.h
nf_conntrack_sctp.h
nf_conntrack_tcp.h conntrack: RFC5961 challenge ACK confuse conntrack LAST-ACK transition 2015-05-15 20:50:56 +02:00
nf_conntrack_tuple_common.h
nf_nat.h netfilter: nft_nat: include a flag attribute 2014-09-09 16:31:27 +02:00
nf_tables.h netfilter: nf_tables: attach net_device to basechain 2015-06-15 23:02:31 +02:00
nf_tables_compat.h netfilter: nf_tables: add compatibility layer for x_tables 2013-10-14 18:00:04 +02:00
nfnetlink.h netfilter: nfnetlink_acct: Adding quota support to accounting framework 2014-04-29 18:25:14 +02:00
nfnetlink_acct.h netfilter: nfnetlink_acct: add filter support to nfacct counter list/reset 2014-08-26 21:36:19 +02:00
nfnetlink_compat.h
nfnetlink_conntrack.h netfilter: nf_conntrack: make sequence number adjustments usuable without NAT 2013-08-28 00:26:48 +02:00
nfnetlink_cthelper.h
nfnetlink_cttimeout.h netfilter: cttimeout: allow to set/get default protocol timeouts 2013-10-01 13:17:39 +02:00
nfnetlink_log.h
nfnetlink_queue.h netfilter: nfnetlink_queue: add security context information 2015-06-18 13:02:24 +02:00
x_tables.h
xt_AUDIT.h
xt_CHECKSUM.h
xt_CLASSIFY.h
xt_CONNMARK.h
xt_CONNSECMARK.h
xt_CT.h netfilter: xt_CT: add alias flag 2013-02-05 01:49:26 +01:00
xt_DSCP.h
xt_HMARK.h netfilter: export xt_HMARK.h to userland 2013-08-14 10:48:05 +02:00
xt_IDLETIMER.h
xt_LED.h
xt_LOG.h
xt_MARK.h
xt_NFLOG.h
xt_NFQUEUE.h netfilter: xt_NFQUEUE: introduce CPU fanout 2013-04-02 01:25:44 +02:00
xt_RATEEST.h
xt_SECMARK.h
xt_SYNPROXY.h netfilter: add SYNPROXY core/target 2013-08-28 00:27:54 +02:00
xt_TCPMSS.h
xt_TCPOPTSTRIP.h
xt_TEE.h
xt_TPROXY.h
xt_addrtype.h
xt_bpf.h net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
xt_cgroup.h netfilter: x_tables: lightweight process control group matching 2014-01-03 23:41:44 +01:00
xt_cluster.h
xt_comment.h
xt_connbytes.h
xt_connlabel.h netfilter: add connlabel conntrack extension 2013-01-18 00:28:15 +01:00
xt_connlimit.h
xt_connmark.h
xt_conntrack.h netfilter: xt_conntrack: Add flag to support aliases 2013-02-05 01:45:23 +01:00
xt_cpu.h
xt_dccp.h
xt_devgroup.h
xt_dscp.h
xt_ecn.h
xt_esp.h
xt_hashlimit.h
xt_helper.h
xt_ipcomp.h netfilter: add IPv4/6 IPComp extension match support 2013-12-24 12:37:58 +01:00
xt_iprange.h
xt_ipvs.h
xt_l2tp.h netfilter: introduce l2tp match extension 2014-01-09 21:36:39 +01:00
xt_length.h
xt_limit.h
xt_mac.h
xt_mark.h
xt_multiport.h
xt_nfacct.h
xt_osf.h netfilter: Fix FSF address in file headers 2013-12-06 12:37:57 -05:00
xt_owner.h
xt_physdev.h
xt_pkttype.h
xt_policy.h
xt_quota.h
xt_rateest.h
xt_realm.h
xt_recent.h
xt_rpfilter.h netfilter: export xt_rpfilter.h to userland 2013-08-14 10:47:15 +02:00
xt_sctp.h
xt_set.h netfilter: ipset: Alignment problem between 64bit kernel 32bit userspace 2014-12-03 12:43:35 +01:00
xt_socket.h netfilter: xt_socket: add XT_SOCKET_RESTORESKMARK flag 2015-06-18 13:05:09 +02:00
xt_state.h
xt_statistic.h
xt_string.h
xt_tcpmss.h
xt_tcpudp.h
xt_time.h
xt_u32.h