Patchwork [v2,2/6] netfilter: Change enqueue handlers return values

login
register
mail settings
Submitter Krishna Kumar
Date May 8, 2012, 9:44 a.m.
Message ID <20120508094407.19531.62855.sendpatchset@localhost.localdomain>
Download mbox | patch
Permalink /patch/157651/
State Superseded
Headers show

Comments

Krishna Kumar - May 8, 2012, 9:44 a.m.
Since fail-open is designed to return >0 to upper layer,
change ipqueue to return 0 as success, instead of skb->len.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: Vivek Kashyap <vivk@us.ibm.com>
Signed-off-by: Sridhar Samudrala <samudrala@us.ibm.com>
---
 net/ipv4/netfilter/ip_queue.c  |    2 +-
 net/ipv6/netfilter/ip6_queue.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -ruNp org/net/ipv4/netfilter/ip_queue.c new/net/ipv4/netfilter/ip_queue.c
--- org/net/ipv4/netfilter/ip_queue.c	2012-05-08 09:15:36.435049552 +0530
+++ new/net/ipv4/netfilter/ip_queue.c	2012-05-08 09:39:53.808091036 +0530
@@ -262,7 +262,7 @@  ipq_enqueue_packet(struct nf_queue_entry
 	__ipq_enqueue_entry(entry);
 
 	spin_unlock_bh(&queue_lock);
-	return status;
+	return 0;
 
 err_out_free_nskb:
 	kfree_skb(nskb);
diff -ruNp org/net/ipv6/netfilter/ip6_queue.c new/net/ipv6/netfilter/ip6_queue.c
--- org/net/ipv6/netfilter/ip6_queue.c	2012-05-08 09:15:36.433050383 +0530
+++ new/net/ipv6/netfilter/ip6_queue.c	2012-05-08 09:39:45.828858720 +0530
@@ -262,7 +262,7 @@  ipq_enqueue_packet(struct nf_queue_entry
 	__ipq_enqueue_entry(entry);
 
 	spin_unlock_bh(&queue_lock);
-	return status;
+	return 0;
 
 err_out_free_nskb:
 	kfree_skb(nskb);