From: David Ahern <dsahern@gmail.com>
To: Stephen Suryaputra <ssuryaextr@gmail.com>, netdev@vger.kernel.org
Cc: dsahern@gmail.com
Subject: Re: [PATCH net] ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop
Date: Tue, 25 Jun 2019 11:51:51 -0600 [thread overview]
Message-ID: <dd17803b-2f9e-89a6-a9e3-f319ca2ac6ce@gmail.com> (raw)
In-Reply-To: <20190625001406.6437-1-ssuryaextr@gmail.com>
On 6/24/19 6:14 PM, Stephen Suryaputra wrote:
> In commit 19e4e768064a8 ("ipv4: Fix raw socket lookup for local
> traffic"), the dif argument to __raw_v4_lookup() is coming from the
> returned value of inet_iif() but the change was done only for the first
> lookup. Subsequent lookups in the while loop still use skb->dev->ifIndex.
>
> Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
> ---
> net/ipv4/raw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
> index 0b8e06ca75d6..40a6abbc9cf6 100644
> --- a/net/ipv4/raw.c
> +++ b/net/ipv4/raw.c
> @@ -197,7 +197,7 @@ static int raw_v4_input(struct sk_buff *skb, const struct iphdr *iph, int hash)
> }
> sk = __raw_v4_lookup(net, sk_next(sk), iph->protocol,
> iph->saddr, iph->daddr,
> - skb->dev->ifindex, sdif);
> + dif, sdif);
> }
> out:
> read_unlock(&raw_v4_hashinfo.lock);
>
ugh, missed that in 19e4e768064a8; thanks for the patch.
Reviewed-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2019-06-25 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 0:14 [PATCH net] ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop Stephen Suryaputra
2019-06-25 17:51 ` David Ahern [this message]
2019-06-25 19:47 ` David Miller
2019-06-25 19:59 ` Stefano Brivio
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=dd17803b-2f9e-89a6-a9e3-f319ca2ac6ce@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ssuryaextr@gmail.com \
/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).