Skip to content

Commit 97a4d46

Browse files
edumazetkuba-moo
authored andcommitted
raw: fix a typo in raw_icmp_error()
I accidentally broke IPv4 traceroute, by swapping iph->saddr and iph->daddr. Probably because raw_icmp_error() and raw_v4_input() use different order for iph->saddr and iph->daddr. Fixes: ba44f81 ("raw: use more conventional iterators") Reported-by: John Sperbeck <jsperbeck@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20220623193540.2851799-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent a69e617 commit 97a4d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/raw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info)
278278
sk_nulls_for_each(sk, hnode, hlist) {
279279
iph = (const struct iphdr *)skb->data;
280280
if (!raw_v4_match(net, sk, iph->protocol,
281-
iph->saddr, iph->daddr, dif, sdif))
281+
iph->daddr, iph->saddr, dif, sdif))
282282
continue;
283283
raw_err(sk, skb, info);
284284
}

0 commit comments

Comments
 (0)