[CTNETLINK] Check for status flags existence on conntrack creation Check that status flags are available in the netlink message received to create a new conntrack. Signed-off-by: Pablo Neira Ayuso Index: linux-2.6.git/net/ipv4/netfilter/ip_conntrack_netlink.c =================================================================== --- linux-2.6.git.orig/net/ipv4/netfilter/ip_conntrack_netlink.c 2006-11-08 23:54:28.000000000 +0100 +++ linux-2.6.git/net/ipv4/netfilter/ip_conntrack_netlink.c 2006-11-08 23:54:55.000000000 +0100 @@ -945,9 +945,11 @@ ctnetlink_create_conntrack(struct nfattr ct->timeout.expires = jiffies + ct->timeout.expires * HZ; ct->status |= IPS_CONFIRMED; - err = ctnetlink_change_status(ct, cda); - if (err < 0) - goto err; + if (cda[CTA_STATUS-1]) { + err = ctnetlink_change_status(ct, cda); + if (err < 0) + goto err; + } if (cda[CTA_PROTOINFO-1]) { err = ctnetlink_change_protoinfo(ct, cda); Index: linux-2.6.git/net/netfilter/nf_conntrack_netlink.c =================================================================== --- linux-2.6.git.orig/net/netfilter/nf_conntrack_netlink.c 2006-11-08 23:55:06.000000000 +0100 +++ linux-2.6.git/net/netfilter/nf_conntrack_netlink.c 2006-11-08 23:55:49.000000000 +0100 @@ -961,9 +961,11 @@ ctnetlink_create_conntrack(struct nfattr ct->timeout.expires = jiffies + ct->timeout.expires * HZ; ct->status |= IPS_CONFIRMED; - err = ctnetlink_change_status(ct, cda); - if (err < 0) - goto err; + if (cda[CTA_STATUS-1]) { + err = ctnetlink_change_status(ct, cda); + if (err < 0) + goto err; + } if (cda[CTA_PROTOINFO-1]) { err = ctnetlink_change_protoinfo(ct, cda);