[ovs-git] [openvswitch/ovs] 260917: datapath: Properly set L4 keys on "later" IP fragm...

Justin Pettit noreply at github.com
Thu Aug 29 00:00:18 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 26091730b1ad09d4484d9eb5d9197d0d8254701f
      https://github.com/openvswitch/ovs/commit/26091730b1ad09d4484d9eb5d9197d0d8254701f
  Author: Greg Rose <gvrose8192 at gmail.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M datapath/conntrack.c
    M datapath/flow.c
    M datapath/flow.h

  Log Message:
  -----------
  datapath: Properly set L4 keys on "later" IP fragments

Upstream commit:
    commit ad06a566e118e57b852cab5933dbbbaebb141de3
    Author: Greg Rose <gvrose8192 at gmail.com>
    Date:   Tue Aug 27 07:58:09 2019 -0700

    openvswitch: Properly set L4 keys on "later" IP fragments

    When IP fragments are reassembled before being sent to conntrack, the
    key from the last fragment is used.  Unless there are reordering
    issues, the last fragment received will not contain the L4 ports, so the
    key for the reassembled datagram won't contain them.  This patch updates
    the key once we have a reassembled datagram.

    The handle_fragments() function works on L3 headers so we pull the L3/L4
    flow key update code from key_extract into a new function
    'key_extract_l3l4'.  Then we add a another new function
    ovs_flow_key_update_l3l4() and export it so that it is accessible by
    handle_fragments() for conntrack packet reassembly.

    Co-authored-by: Justin Pettit <jpettit at ovn.org>
    Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
    Acked-by: Pravin B Shelar <pshelar at ovn.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>


  Commit: c98f77699f06edd2ac9a639b9755afdb41dd9989
      https://github.com/openvswitch/ovs/commit/c98f77699f06edd2ac9a639b9755afdb41dd9989
  Author: Justin Pettit <jpettit at ovn.org>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M datapath/flow.c

  Log Message:
  -----------
  datapath: Clear the L4 portion of the key for "later" fragments

Upstream commit:
    commit 0754b4e8cdf3eec6e4122e79af26ed9bab20f8f8
    Author: Justin Pettit <jpettit at ovn.org>
    Date:   Tue Aug 27 07:58:10 2019 -0700

    openvswitch: Clear the L4 portion of the key for "later" fragments.

    Only the first fragment in a datagram contains the L4 headers.  When the
    Open vSwitch module parses a packet, it always sets the IP protocol
    field in the key, but can only set the L4 fields on the first fragment.
    The original behavior would not clear the L4 portion of the key, so
    garbage values would be sent in the key for "later" fragments.  This
    patch clears the L4 fields in that circumstance to prevent sending those
    garbage values as part of the upcall.

    Signed-off-by: Justin Pettit <jpettit at ovn.org>
    Acked-by: Pravin B Shelar <pshelar at ovn.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/96b2c715efc5...c98f77699f06


More information about the git mailing list