diff mbox series

[net-next] raw: fix a typo in raw_icmp_error()

Message ID 20220623193540.2851799-1-edumazet@google.com (mailing list archive)
State Accepted
Commit 97a4d46b1516250d640c1ae0c9e7129d160d6a1c
Delegated to: Netdev Maintainers
Headers show
Series [net-next] raw: fix a typo in raw_icmp_error() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers warning 2 maintainers not CCed: yoshfuji@linux-ipv6.org dsahern@kernel.org
netdev/build_clang success Errors and warnings before: 6 this patch: 6
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch warning WARNING: 'swaping' may be misspelled - perhaps 'swapping'?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Eric Dumazet June 23, 2022, 7:35 p.m. UTC
I accidentally broke IPv4 traceroute, by swaping iph->saddr and iph->daddr.

Probably because raw_icmp_error() and raw_v4_input()
use different order for iph->saddr and iph->daddr.

Fixes: ba44f8182ec2 ("raw: use more conventional iterators")
Reported-by: John Sperbeck<jsperbeck@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/raw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org June 25, 2022, 6 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 23 Jun 2022 19:35:40 +0000 you wrote:
> I accidentally broke IPv4 traceroute, by swaping iph->saddr and iph->daddr.
> 
> Probably because raw_icmp_error() and raw_v4_input()
> use different order for iph->saddr and iph->daddr.
> 
> Fixes: ba44f8182ec2 ("raw: use more conventional iterators")
> Reported-by: John Sperbeck<jsperbeck@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> [...]

Here is the summary with links:
  - [net-next] raw: fix a typo in raw_icmp_error()
    https://git.kernel.org/netdev/net-next/c/97a4d46b1516

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 027389969915e456b0009e2a0b4ad81afb836e9d..006c1f0ed8b4731a8c64de282409e4bb03a6c1a6 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -278,7 +278,7 @@  void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info)
 	sk_nulls_for_each(sk, hnode, hlist) {
 		iph = (const struct iphdr *)skb->data;
 		if (!raw_v4_match(net, sk, iph->protocol,
-				  iph->saddr, iph->daddr, dif, sdif))
+				  iph->daddr, iph->saddr, dif, sdif))
 			continue;
 		raw_err(sk, skb, info);
 	}