diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2005-11-09 16:03:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-09 16:03:42 -0500 |
commit | a856a19a9f3ee14fc0d555470f3af138aeb0245c (patch) | |
tree | 52b79f12f4780e9b4afea6e2e6ed0f33d6948d92 | |
parent | fcda46128d5cb50075339b79ce585ab767337e9e (diff) |
[NETFILTER] ctnetlink: Add support to identify expectations by ID's
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_netlink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 7fe745659642..5c1c0a3d1c4b 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -1293,6 +1293,14 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, | |||
1293 | if (!exp) | 1293 | if (!exp) |
1294 | return -ENOENT; | 1294 | return -ENOENT; |
1295 | 1295 | ||
1296 | if (cda[CTA_EXPECT_ID-1]) { | ||
1297 | u_int32_t id = *(u_int32_t *)NFA_DATA(cda[CTA_EXPECT_ID-1]); | ||
1298 | if (exp->id != ntohl(id)) { | ||
1299 | ip_conntrack_expect_put(exp); | ||
1300 | return -ENOENT; | ||
1301 | } | ||
1302 | } | ||
1303 | |||
1296 | err = -ENOMEM; | 1304 | err = -ENOMEM; |
1297 | skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); | 1305 | skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); |
1298 | if (!skb2) | 1306 | if (!skb2) |