[ovs-git] [openvswitch/ovs] b7a515: odp-util: Fix segfault in MPLS attribute parsing.

GitHub noreply at github.com
Fri Oct 31 23:03:48 UTC 2014


  Branch: refs/heads/branch-2.2
  Home:   https://github.com/openvswitch/ovs
  Commit: b7a515807c8715e7e283d3e5e3901ceb42f8f56f
      https://github.com/openvswitch/ovs/commit/b7a515807c8715e7e283d3e5e3901ceb42f8f56f
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-10-31 (Fri, 31 Oct 2014)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Fix segfault in MPLS attribute parsing.

Just because the ethertype is MPLS, this doesn't mean that the datapath
understands and provides OVS_KEY_ATTR_MPLS attributes for the flow.
Previously we would check the size of the OVS_KEY_ATTR_MPLS attribute
before checking whether the attribute is present. This would cause a
segfault in nl_attr_get_size(), usually triggered from a handler thread.

This patch brings the MPLS parsing code more in line with the rest of
the parse_l2_5_onward() function, by only processing MPLS if the
attribute is present.

Reported-by: Pravin B Shelar <pshelar at nicira.com>
Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>




More information about the git mailing list