]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
netfilter: nf_conntrack_sip: remove net variable shadowing
authorFlorian Westphal <fw@strlen.de>
Tue, 10 Mar 2026 15:05:51 +0000 (16:05 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 8 Apr 2026 05:51:27 +0000 (07:51 +0200)
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.

Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_conntrack_sip.c

index 939502ff7c87138335262a742c11a735d1c1eae5..182cfb1194487487aa27cb5c57fd9673c8271399 100644 (file)
@@ -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));