Skip to contentSkip to conversation

netfilter: nfnetlink_queue: avoid peer_portid test

PATCH RESEND Applied Florian Westphal 2 participants 2 messages May 25, 2013 – May 27, 2013

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH RESEND 1/1 netfilter: nfnetlink_queue: avoid peer_portid test

The portid is set to NETLINK_CB(skb).portid at create time. The run-time check will always be false.

---
Pablo,
This is a re-send of a similar patch:
( http://patchwork.ozlabs.org/patch/238013/ )

Change since last version:
- Remove check altogether instead of moving it to instance_create().

net/netfilter/nfnetlink_queue_core.c +0 -4
index 2e0e835..cff4449 100644
@@ -509,10 +509,6 @@ __nfqnl_enqueue_packet(struct net *net, struct nfqnl_instance *queue,
 	}
 	spin_lock_bh(&queue->lock);
 
-	if (!queue->peer_portid) {
-		err = -EINVAL;
-		goto err_out_free_nskb;
-	}
 	if (queue->queue_total >= queue->queue_maxlen) {
 		if (queue->flags & NFQA_CFG_F_FAIL_OPEN) {
 			failopen = 1;
Signature · 1 line
1.8.1.5
maintainer Applied
#1 lore raw
Quoted 2 lines · Florian Westphal

The portid is set to NETLINK_CB(skb).portid at create time. The run-time check will always be false.

Applied to nf-next, thanks Florian.