~xnox/ubuntu-z-systems/+git/ovs:branch-2.0

Last commit made on 2019-02-04
Get this branch:
git clone -b branch-2.0 https://git.launchpad.net/~xnox/ubuntu-z-systems/+git/ovs

Branch merges

Branch information

Name:
branch-2.0
Repository:
lp:~xnox/ubuntu-z-systems/+git/ovs

Recent commits

99c9ba8... by Yifeng Sun

odp-util: Stop parse odp actions if nlattr is overflow

`encap = nl_msg_start_nested(key, OVS_KEY_ATTR_ENCAP)` ensures that
key->size >= (encap + NLA_HDRLEN), so the `if` statement is safe.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11306
Signed-off-by: Yifeng Sun <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>

d8bd749... by Ilya Maximets

python: Catch setsockopt exceptions for TCP stream.

'sock.setsockopt' could throw exceptions. For example, if non-blocking
connection failed before the call:

  Traceback (most recent call last):
    File "../.././test-ovsdb.py", line 896, in <module>
      main(sys.argv)
    File "../.././test-ovsdb.py", line 891, in main
      func(*args)
    File "../.././test-ovsdb.py", line 604, in do_idl
      ovs.stream.Stream.open(r))
    File "/root/git_/ovs/python/ovs/stream.py", line 190, in open
      error, sock = cls._open(suffix, dscp)
    File "/root/git_/ovs/python/ovs/stream.py", line 744, in _open
      sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
    File "/usr/local/lib/python2.7/socket.py", line 228, in meth
      return getattr(self._sock,name)(*args)
  socket.error: [Errno 54] Connection reset by peer

This fixes tests on FreeBSD.

Signed-off-by: Ilya Maximets <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>

e67b120... by Ben Pfaff <email address hidden>

netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH.

The function comment for netdev_queue_dump_next() said that it cleared its
'detail' argument, but it didn't actually do that, which meant that details
could be incorrectly carried along from one queue to the next.

Reported-by: Flavio Leitner <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>
Acked-by: Eelco Chaudron <email address hidden>
Acked-by: Flavio Leitner <email address hidden>

9048c6b... by Ben Pfaff <email address hidden>

netdev-linux: Avoid division by 0 if kernel reports bad scheduler data.

If the kernel reported a value of 0 for the second value in
/proc/net/psched, it would cause a division-by-zero fault in
read_psched(). I don't know of a kernel that would actually do that, but
it's still better to be safe.

Found by clang static analyzer.

Reported-by: Bhargava Shastry <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>
Reviewed-by: Yifeng Sun <email address hidden>

7919a42... by aconole

ovs-tcpundump: fix a conversion issue

When I tried using ovs-tcpundump, I got the following error message:
Traceback (most recent call last):
  File ./ovs-tcpundump, line 64, in <module>
    if m is None or int(m.group(1)) == 0:
ValueError: invalid literal for int() with base 10: '00a0'

Signed-off-by: Aaron Conole <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>

75c2918... by Ben Pfaff <email address hidden>

connmgr: Fix crash when in_band_create() fails.

update_in_band_remotes() created an in-band manager and then tried to work
with it without first checking whether creation had succeeded. If it
failed, this led to a segfault.

Reported-by: Numan Siddique <email address hidden>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/335530.html
Signed-off-by: Ben Pfaff <email address hidden>
Acked-by: Justin Pettit <email address hidden>

5e386c8... by Yunjian Wang <email address hidden>

ovsdb-types: Fix memory leak on error path.

Fixes: bd76d25d8b3b ("ovsdb: Add simple constraints.")
Signed-off-by: Yunjian Wang <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>

5a3851e... by Ben Pfaff <email address hidden>

rconn: Avoid abort for ill-behaved remote.

If an rconn peer fails to send a hello message, the version number doesn't
get set. Later, if the peer delays long enough, the rconn attempts to send
an echo request but assert-fails instead because it doesn't know what
version to use. This fixes the problem.

To reproduce this problem:

    make sandbox
    ovs-vsctl add-br br0
    ovs-vsctl set-controller br0 ptcp:12345
    nc 127.0.0.1 12345

and wait 10 seconds for ovs-vswitchd to die. (Then exit the sandbox.)

Reported-by: 张东亚 <email address hidden>
Signed-off-by: Ben Pfaff <email address hidden>
Acked-by: Justin Pettit <email address hidden>

6679396... by Ben Pfaff <email address hidden>

ofproto-dpif-ipfix: Fix assertion failure for bad configuration.

The assertions in dpif_ipfix_set_options() made some bad assumptions about
flow exporters. The code that added and removed exporters would add a flow
exporter even if it had an invalid configuration ("broken"), but the
assertions checked that broken flow exporters were not added. Thus, the
when a flow exporter was broken, ovs-vswitchd would crash due to an
assertion failure.

Here is an example vsctl command that, run in the sandbox, would crash
ovs-vswitchd:

    ovs-vsctl \
        -- add-br br0 \
        -- --id=@br0 get bridge br0 \
        -- --id=@ipfix create ipfix target='["xyzzy"]' \
        -- create flow_sample_collector_set id=1 bridge=@br0 ipfix=@ipfix

The minimal fix would be to remove the assertions, but this would leave
broken flow exporters in place. This commit goes a little farther and
actually removes broken flow exporters.

This fix pulls code out of an "if" statement to a higher level, so it is a
smaller fix when viewed igoring space changes.

This bug dates back to the introduction of IPFIX in 2013.

VMware-BZ: #1779123
CC: Romain Lenglet <email address hidden>
Fixes: 29089a540cfa ("Implement IPFIX export")
Signed-off-by: Ben Pfaff <email address hidden>
Acked-by: Jarno Rajahalme <email address hidden>

bb51b56... by Jarno Rajahalme <email address hidden>

Revert "bond: Use correct type for slave's change_seq."

This reverts commit 563752aad5796c6f7708924e315ee184d07b9773, which
was mistakenly applied.

Signed-off-by: Jarno Rajahalme <email address hidden>