Skip to contentSkip to conversation

netfilter: xt_connlimit: don't store address in the conn nodes

PATCH Applied Florian Westphal 2 participants 2 messages Oct 15, 2017 – Oct 24, 2017

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 netfilter: xt_connlimit: don't store address in the conn nodes

Only stored, never read. This is a leftover from commit 7d08487777c8 ("netfilter: connlimit: use rbtree for per-host conntrack obj storage"), which added the rbtree node struct that stores the address instead.

---
 net/netfilter/xt_connlimit.c | 3 ---
 1 file changed, 3 deletions(-)
net/netfilter/xt_connlimit.c +0 -3
index ffa8eec980e9..ce2870428631 100644
@@ -46,7 +46,6 @@
 struct xt_connlimit_conn {
 	struct hlist_node		node;
 	struct nf_conntrack_tuple	tuple;
-	union nf_inet_addr		addr;
 };
 
 struct xt_connlimit_rb {
@@ -125,7 +124,6 @@ static bool add_hlist(struct hlist_head *head,
 	if (conn == NULL)
 		return false;
 	conn->tuple = *tuple;
-	conn->addr = *addr;
 	hlist_add_head(&conn->node, head);
 	return true;
 }
@@ -270,7 +268,6 @@ count_tree(struct net *net, struct rb_root *root,
 	}
 
 	conn->tuple = *tuple;
-	conn->addr = *addr;
 	rbconn->addr = *addr;
 
 	INIT_HLIST_HEAD(&rbconn->hhead);
Signature · 1 line
2.13.6
maintainer Applied
#1 lore raw
Quoted 3 lines · Florian Westphal

Only stored, never read. This is a leftover from commit 7d08487777c8 ("netfilter: connlimit: use rbtree for per-host conntrack obj storage"), which added the rbtree node struct that stores the address instead.

Applied, thanks.