From: Tom Herbert <tom@herbertland.com>
To: Alexander Duyck <aduyck@mirantis.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Alexander Duyck <alexander.duyck@gmail.com>
Subject: Re: [net-next PATCH 1/5] flow_dissector: Check for IP fragmentation even if not using IPv4 address
Date: Wed, 24 Feb 2016 10:14:05 -0800 [thread overview]
Message-ID: <CALx6S3499MvvS2SsDQF-c+ymtekcp6TMbmBnp=n4kb5trtJU5Q@mail.gmail.com> (raw)
In-Reply-To: <20160224172937.12339.81437.stgit@localhost.localdomain>
On Wed, Feb 24, 2016 at 9:29 AM, Alexander Duyck <aduyck@mirantis.com> wrote:
> This patch corrects the logic for the IPv4 parsing so that it is consistent
> with how we handle IPv6. Specifically if we do not have the flow key
> indicating we want the addresses we still may need to take a look at the IP
> fragmentation bits and to see if we should stop after we have recognized
> the L3 header.
>
> Fixes: 807e165dc44f ("flow_dissector: Add control/reporting of fragmentation")
> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Acked-by: Tom Herbert <tom@herbertland.com>
> ---
> net/core/flow_dissector.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 12e700332010..1f88f8280280 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -178,15 +178,16 @@ ip:
>
> ip_proto = iph->protocol;
>
> - if (!dissector_uses_key(flow_dissector,
> - FLOW_DISSECTOR_KEY_IPV4_ADDRS))
> - break;
> + if (dissector_uses_key(flow_dissector,
> + FLOW_DISSECTOR_KEY_IPV4_ADDRS)) {
> + key_addrs = skb_flow_dissector_target(flow_dissector,
> + FLOW_DISSECTOR_KEY_IPV4_ADDRS,
> + target_container);
>
> - key_addrs = skb_flow_dissector_target(flow_dissector,
> - FLOW_DISSECTOR_KEY_IPV4_ADDRS, target_container);
> - memcpy(&key_addrs->v4addrs, &iph->saddr,
> - sizeof(key_addrs->v4addrs));
> - key_control->addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
> + memcpy(&key_addrs->v4addrs, &iph->saddr,
> + sizeof(key_addrs->v4addrs));
> + key_control->addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
> + }
>
> if (ip_is_fragment(iph)) {
> key_control->flags |= FLOW_DIS_IS_FRAGMENT;
>
next prev parent reply other threads:[~2016-02-24 18:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 17:29 [net-next PATCH 0/5] Flow dissector fixes and improvements Alexander Duyck
2016-02-24 17:29 ` [net-next PATCH 1/5] flow_dissector: Check for IP fragmentation even if not using IPv4 address Alexander Duyck
2016-02-24 18:14 ` Tom Herbert [this message]
2016-02-24 17:29 ` [net-next PATCH 2/5] flow_dissector: Fix fragment handling for header length computation Alexander Duyck
2016-02-24 18:14 ` Tom Herbert
2016-02-24 17:29 ` [net-next PATCH 3/5] flow_dissector: Correctly handle parsing FCoE Alexander Duyck
2016-02-24 18:14 ` Tom Herbert
2016-02-24 17:29 ` [net-next PATCH 4/5] flow_dissector: Use same pointer for IPv4 and IPv6 addresses Alexander Duyck
2016-02-24 18:15 ` Tom Herbert
2016-02-24 17:30 ` [net-next PATCH 5/5] eth: Pull header from first fragment via eth_get_headlen Alexander Duyck
2016-02-24 18:15 ` Tom Herbert
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='CALx6S3499MvvS2SsDQF-c+ymtekcp6TMbmBnp=n4kb5trtJU5Q@mail.gmail.com' \
--to=tom@herbertland.com \
--cc=aduyck@mirantis.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).