[ovs-git] [openvswitch/ovs] eb46e3: ovn-controller: avoid crash when vswitchd connecti...

GitHub noreply at github.com
Wed Jul 12 05:01:54 UTC 2017


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: eb46e318faccf99c24cffee18501fe36cb87a0f8
      https://github.com/openvswitch/ovs/commit/eb46e318faccf99c24cffee18501fe36cb87a0f8
  Author: Lance Richardson <lrichard at redhat.com>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M ovn/controller/ofctrl.c

  Log Message:
  -----------
  ovn-controller: avoid crash when vswitchd connection is lost

When ovs-vswitchd has dropped its connection to ovn-controller,
rconn_get_version() will return -1. OpenFlow messages built by
ofctrl_put() in this condition will have an invalid OpenFlow version
value of 255, which eventually leads to ovn-controller crashing
due to an assertion failure in raw_instance_get().

Avoid this crash by improving the ofctrl_can_put() test to ensure
that the negotiated version is available. (Note that checking
rconn_is_connected() would not be sufficient since rconn S_IDLE
state is considered "connected" but version negotiation is not
necessarily complete).

Signed-off-by: Lance Richardson <lrichard at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list