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

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

Branch merges

Branch information

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

Recent commits

9f38589... 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>

35f095f... by Ilya Maximets

python: Escape backslashes while formatting logs.

Since python version 3.7 (and some 3.6+ versions) regexp engine
changed to treat the wrong escape sequences as errors. Previously,
if the replace string had something like '\u0000', '\u' was
qualified as a bad escape sequence and treated just as a sequence
of characters '\' and 'u'. But know this triggers an error:

  Traceback (most recent call last):
    File "/usr/lib/python3.7/sre_parse.py", line 1021, in parse_template
      this = chr(ESCAPES[this][1])
  KeyError: '\\u'

From the documentation [1]:

  Unknown escapes consisting of '\' and an ASCII letter in replacement
  templates for re.sub() were deprecated in Python 3.5, and will now
  cause an error.

[1] https://docs.python.org/3/whatsnew/3.7.html#api-and-feature-removals

We need to escape the backslash by another one to keep regexp engine
from errors. In case of '\\u000', '\\' is a valid escape sequence
and the 'u' is a simple character.

To be 100% safe we need to use 're.escape(replace)', but it escapes
too many characters making the logs hard to read.

This change fixes Python 3 tests on systems with python 3.7.
Should be backward compatible.

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

5e8f1b1... 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>

1a35c5c... 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>

f049ebb... 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>

95262f0... by Ben Pfaff <email address hidden>

pcap-file: Fix formatting of log message.

Signed-off-by: Ben Pfaff <email address hidden>
Acked-by: Alin Gabriel Serdean <email address hidden>

486c08e... 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>

dcb9da3... 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>

d2395cd... 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>

4137953... by zhongbaisong <email address hidden>

ofp-util: fix memory leak in ofputil_pull_ofp11_buckets

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