Merge branch 'master' of git://1984.lsi.us.es/nf-next
[~shefty/rdma-dev.git] / net / netfilter / nf_conntrack_netlink.c
index d490a300ce2b5eede4f90f7b4c29969b81fabbe4..5d60e04f9679d4e966b7f3fa8b5d82efdebd940c 100644 (file)
@@ -1782,6 +1782,9 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
                if (nlh->nlmsg_flags & NLM_F_CREATE) {
                        enum ip_conntrack_events events;
 
+                       if (!cda[CTA_TUPLE_ORIG] || !cda[CTA_TUPLE_REPLY])
+                               return -EINVAL;
+
                        ct = ctnetlink_create_conntrack(net, zone, cda, &otuple,
                                                        &rtuple, u3);
                        if (IS_ERR(ct))