[ovs-dev] flow: Fix IPv6 header parser with partial offloading.
diff mbox series

Message ID 1573203764-10009-1-git-send-email-wangzk320@163.com
State New
Headers show
Series
  • [ovs-dev] flow: Fix IPv6 header parser with partial offloading.
Related show

Commit Message

Zhike Wang Nov. 8, 2019, 9:02 a.m. UTC
Set new_proto before it is used in parse_ipv6_ext_hdrs__().

Signed-off-by: Zhike Wang <wangzk320@163.com>
---
 lib/flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Pfaff Nov. 22, 2019, 2:02 a.m. UTC | #1
On Fri, Nov 08, 2019 at 05:02:44PM +0800, Zhike Wang wrote:
> Set new_proto before it is used in parse_ipv6_ext_hdrs__().
> 
> Signed-off-by: Zhike Wang <wangzk320@163.com>

That's embarrassing.

I applied this to master and branch-2.12.

Patch
diff mbox series

diff --git a/lib/flow.c b/lib/flow.c
index a18a1e6..45bb96b 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -1136,11 +1136,11 @@  parse_tcp_flags(struct dp_packet *packet)
         dp_packet_set_l2_pad_size(packet, size - plen);
         size = plen;
         const struct ovs_16aligned_ip6_frag *frag_hdr;
+        nw_proto = nh->ip6_nxt;
         if (!parse_ipv6_ext_hdrs__(&data, &size, &nw_proto, &nw_frag,
             &frag_hdr)) {
             return 0;
         }
-        nw_proto = nh->ip6_nxt;
     } else {
         return 0;
     }