From: Sven Eckelmann <sven@narfation.org>
To: mareklindner@neomailbox.ch, sw@simonwunderlich.de, a@unstable.cc,
Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org,
b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
Subject: Re: [PATCH-net] batman-adv: Fix "Arguments in wrong order" issue
Date: Fri, 15 Nov 2024 08:14:40 +0100 [thread overview]
Message-ID: <2963697.e9J7NaK4W3@ripper> (raw)
In-Reply-To: <20241115045637.15481-1-dheeraj.linuxdev@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]
On Friday, 15 November 2024 05:56:37 CET Dheeraj Reddy Jonnalagadda wrote:
> This commit fixes an "Arguments in wrong order" issue detected by
> Coverity (CID 1376875).
>
> Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
> ---
> net/batman-adv/distributed-arp-table.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/
distributed-arp-table.c
> index 801eff8a40e5..781a5118d441 100644
> --- a/net/batman-adv/distributed-arp-table.c
> +++ b/net/batman-adv/distributed-arp-table.c
> @@ -1195,7 +1195,7 @@ bool batadv_dat_snoop_outgoing_arp_request(struct
batadv_priv *bat_priv,
> goto out;
> }
>
> - skb_new = batadv_dat_arp_create_reply(bat_priv, ip_dst,
ip_src,
> + skb_new = batadv_dat_arp_create_reply(bat_priv, ip_src,
ip_dst,
>
dat_entry->mac_addr,
>
hw_src, vid);
> if (!skb_new)
>
Sorry, but this is wrong. We send an answer here ("ARP request
replied locally") and of course we must then switch src and destination.
Otherwise we would send the ARP response to the entity which didn't requested
it.
This was already marked as false positive in Coverity a long time ago.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2024-11-15 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 4:56 [PATCH-net] batman-adv: Fix "Arguments in wrong order" issue Dheeraj Reddy Jonnalagadda
2024-11-15 7:14 ` Sven Eckelmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2963697.e9J7NaK4W3@ripper \
--to=sven@narfation.org \
--cc=a@unstable.cc \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=dheeraj.linuxdev@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).