From: Yi-Hung Wei <yihung.wei@gmail.com>
To: netdev@vger.kernel.org, u9012063@gmail.com
Cc: Yi-Hung Wei <yihung.wei@gmail.com>
Subject: [PATCH net-next] openvswitch: Derive IP protocol number for IPv6 later frags
Date: Fri, 10 Aug 2018 10:19:41 -0700 [thread overview]
Message-ID: <1533921581-22806-1-git-send-email-yihung.wei@gmail.com> (raw)
Currently, OVS only parses the IP protocol number for the first
IPv6 fragment, but sets the IP protocol number for the later fragments
to be NEXTHDF_FRAGMENT. This patch tries to derive the IP protocol
number for the IPV6 later frags so that we can match that.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
---
net/openvswitch/flow.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 56b8e7167790..3d654c4f71be 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -297,7 +297,13 @@ static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key)
nh_len = payload_ofs - nh_ofs;
skb_set_transport_header(skb, nh_ofs + nh_len);
- key->ip.proto = nexthdr;
+ if (key->ip.frag == OVS_FRAG_TYPE_LATER) {
+ unsigned int offset = 0;
+
+ key->ip.proto = ipv6_find_hdr(skb, &offset, -1, NULL, NULL);
+ } else {
+ key->ip.proto = nexthdr;
+ }
return nh_len;
}
--
2.7.4
next reply other threads:[~2018-08-10 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 17:19 Yi-Hung Wei [this message]
2018-08-13 1:09 ` [PATCH net-next] openvswitch: Derive IP protocol number for IPv6 later frags Pravin Shelar
2018-08-13 17:48 ` William Tu
2018-08-13 19:47 ` Yi-Hung Wei
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=1533921581-22806-1-git-send-email-yihung.wei@gmail.com \
--to=yihung.wei@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=u9012063@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).