Skip to contentSkip to conversation

Identify expect by its ID

PATCH Applied Pablo Neira 2 participants 2 messages Nov 8, 2005

Subsystems (2)
lore
Share & tools
lore

Pablo Neira

author maintainer
#0 lore raw

PATCH 3/8 Identify expect by its ID

Add support to identify expectations by ID's at getting.

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

Add support to identify expectations by ID's at getting.

net/ipv4/netfilter/ip_conntrack_netlink.c +8 -0
Index: netfilter-2.6.14.git/net/ipv4/netfilter/ip_conntrack_netlink.c
===================================================================
@@ -1299,6 +1299,14 @@ ctnetlink_get_expect(struct sock *ctnl, 
 	if (!exp)
 		return -ENOENT;
 
+	if (cda[CTA_EXPECT_ID-1]) {
+		u_int32_t id = *(u_int32_t *)NFA_DATA(cda[CTA_EXPECT_ID-1]);
+		if (exp->id != ntohl(id)) {
+			ip_conntrack_expect_put(exp);
+			return -ENOENT;
+		}
+	}	
+
 	err = -ENOMEM;
 	skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
 	if (!skb2)
Applied
#1 lore raw
Quoted 1 line · Pablo Neira

Add support to identify expectations by ID's at getting.

thanks, applied.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie