[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4634a4eb-6be5-4b10-bd22-d95e1970ed42@uliege.be>
Date: Tue, 19 Nov 2024 13:59:29 +0100
From: Justin Iurman <justin.iurman@...ege.be>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
kuba@...nel.org, horms@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 2/4] net: ipv6: ioam6_iptunnel: mitigate
2-realloc issue
On 11/19/24 11:42, Paolo Abeni wrote>> - skb_dst_drop(skb);
>> - skb_dst_set(skb, dst);
>> + skb_dst_drop(skb);
>> + skb_dst_set(skb, dst);
>
> Why the above 2 statements are not done only in case of ip address
> match, as in the existing code?
I guess you meant "when they do *not* match", right?
>>
>> + if (!ipv6_addr_equal(&orig_daddr, &ipv6_hdr(skb)->daddr))
>> return dst_output(net, sk, skb);
>> - }
Good catch. Initially, the only reason was to be on the safe side. Will
change it to:
if (!ipv6_addr_equal(&orig_daddr, &ipv6_hdr(skb)->daddr)) {
skb_dst_drop(skb);
skb_dst_set(skb, dst);
return dst_output(net, sk, skb);
}
Thanks Paolo!
Cheers,
Justin
Powered by blists - more mailing lists