From: David Miller <davem@davemloft.net>
To: pabeni@redhat.com
Cc: netdev@vger.kernel.org, edumazet@google.com, hannes@stressinduktion.org
Subject: Re: [RFC PATCH] IP: do not modify ingress packet IP option in ip_options_echo()
Date: Mon, 24 Jul 2017 14:12:53 -0700 (PDT) [thread overview]
Message-ID: <20170724.141253.769254590231937263.davem@davemloft.net> (raw)
In-Reply-To: <f5758b6b7199d2d2a218b0ad36f1e5ef108eac43.1500642854.git.pabeni@redhat.com>
From: Paolo Abeni <pabeni@redhat.com>
Date: Fri, 21 Jul 2017 15:55:18 +0200
> diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
> index 93157f2..fdda973 100644
> --- a/net/ipv4/ip_options.c
> +++ b/net/ipv4/ip_options.c
> @@ -174,9 +174,6 @@ int __ip_options_echo(struct ip_options *dopt, struct sk_buff *skb,
> doffset -= 4;
> }
> if (doffset > 3) {
> - __be32 daddr = fib_compute_spec_dst(skb);
> -
> - memcpy(&start[doffset-1], &daddr, 4);
> dopt->faddr = faddr;
This transformation is required, but in the destination not the source.
The red flag is that we are indexing 'start' with 'doffset' instead of
'soffset'.
next prev parent reply other threads:[~2017-07-24 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 13:55 [RFC PATCH] IP: do not modify ingress packet IP option in ip_options_echo() Paolo Abeni
2017-07-24 21:12 ` David Miller [this message]
2017-07-25 15:26 ` Paolo Abeni
2017-07-28 20:47 ` Hannes Frederic Sowa
2017-08-07 3:49 ` David Miller
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=20170724.141253.769254590231937263.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).