Add conntrack marking support from userspace
Subsystems (2)
Pablo Neira
maintainerPATCH 3/7 Add conntrack marking support from userspace
This patch adds support for conntrack marking from user space.
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
This patch adds support for conntrack marking from user space.
Signed-off-by Pablo Neira Ayuso <[email protected]>
net/ipv4/netfilter/ip_conntrack_netlink.c +10 -0
@@ -979,6 +979,11 @@ ctnetlink_change_conntrack(struct ip_conreturn err; } +#if defined(CONFIG_IP_NF_CONNTRACK_MARK ) +if (cda[CTA_MARK -1 ]) + ct->mark =ntohl (*(u_int32_t *)NFA_DATA (cda[CTA_MARK -1 ])); +#endif +DEBUGP ("all done\n" );return 0 ; }
@@ -1022,6 +1027,11 @@ ctnetlink_create_conntrack(struct nfattrif (ct->helper)ip_conntrack_helper_put (ct->helper); +#if defined(CONFIG_IP_NF_CONNTRACK_MARK ) +if (cda[CTA_MARK -1 ]) + ct->mark =ntohl (*(u_int32_t *)NFA_DATA (cda[CTA_MARK -1 ])); +#endif +DEBUGP ("conntrack with id %u inserted\n" , ct->id);return 0 ;
Quoted 1 line · Pablo Neira
This patch adds support for conntrack marking from user space.
This seems to be missing sizechecks. Looking at ip_conntrack_netlink, they seem to be missing a few other places too.