Skip to contentSkip to conversation

netfilter: nf_conntrack_sip: remove net variable shadowing

PATCH New Florian Westphal 1 participant 1 message Mar 12

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nf_conntrack_sip: remove net variable shadowing

net is already set, derived from nf_conn.
I don't see how the device could be living in a different netns than the conntrack entry.

Remove the extra variable and re-use existing one.

---
 net/netfilter/nf_conntrack_sip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/netfilter/nf_conntrack_sip.c +1 -2
index ca748f8dbff1..2a60a425880d 100644
@@ -869,9 +869,8 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, unsigned int protoff,
 		saddr = &ct->tuplehash[!dir].tuple.src.u3;
 	} else if (sip_external_media) {
 		struct net_device *dev = skb_dst(skb)->dev;
-		struct net *net = dev_net(dev);
-		struct flowi fl;
 		struct dst_entry *dst = NULL;
+		struct flowi fl;
 
 		memset(&fl, 0, sizeof(fl));
 
Signature · 1 line
2.52.0