diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 99cb42d..38185bf 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -52513,7 +52513,7 @@ index 9f35713ef5..0b543cf222 100644 dpif_netdev_enumerate, dpif_netdev_port_open_type, diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c -index 71e35ccdda..f95e8fa4f9 100644 +index 71e35ccdda..6f2c7bc902 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -85,7 +85,7 @@ enum { MAX_PORTS = USHRT_MAX }; @@ -52525,6 +52525,15 @@ index 71e35ccdda..f95e8fa4f9 100644 /* This PID is not used by the kernel datapath when using dispatch per CPU, * but it is required to be set (not zero). */ +@@ -395,7 +395,7 @@ dpif_netlink_open(const struct dpif_class *class OVS_UNUSED, const char *name, + dp_request.user_features |= OVS_DP_F_UNALIGNED; + dp_request.user_features |= OVS_DP_F_VPORT_PIDS; + dp_request.user_features |= OVS_DP_F_UNSUPPORTED; +- error = dpif_netlink_dp_transact(&dp_request, &dp, &buf); ++ error = dpif_netlink_dp_transact(&dp_request, NULL, NULL); + if (error) { + /* The Open vSwitch kernel module has two modes for dispatching + * upcalls: per-vport and per-cpu. @@ -801,14 +801,28 @@ dpif_netlink_set_handler_pids(struct dpif *dpif_, const uint32_t *upcall_pids, uint32_t n_upcall_pids) { @@ -53326,6 +53335,18 @@ index a40209ec0b..a62add2fda 100644 if (error) { return error; } +diff --git a/lib/learning-switch.c b/lib/learning-switch.c +index 8102475cae..cdf42935c1 100644 +--- a/lib/learning-switch.c ++++ b/lib/learning-switch.c +@@ -569,6 +569,7 @@ process_packet_in(struct lswitch *sw, const struct ofp_header *oh) + } + + /* Prepare packet_out in case we need one. */ ++ match_init_catchall(&po.flow_metadata); + po.buffer_id = buffer_id; + if (buffer_id == UINT32_MAX) { + po.packet = dp_packet_data(&pkt); diff --git a/lib/libopenvswitch.pc.in b/lib/libopenvswitch.pc.in index 2a3f2ca7bc..44fbb1f9fd 100644 --- a/lib/libopenvswitch.pc.in @@ -55702,6 +55723,29 @@ index 4579548ee1..9485ddfc93 100644 break; } +diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c +index a90b926efb..102b183a8f 100644 +--- a/lib/ofp-parse.c ++++ b/lib/ofp-parse.c +@@ -71,16 +71,13 @@ str_to_u16(const char *str, const char *name, uint16_t *valuep) + char * OVS_WARN_UNUSED_RESULT + str_to_u32(const char *str, uint32_t *valuep) + { +- char *tail; +- uint32_t value; ++ unsigned long long value; + + if (!str[0]) { + return xstrdup("missing required numeric argument"); + } + +- errno = 0; +- value = strtoul(str, &tail, 0); +- if (errno == EINVAL || errno == ERANGE || *tail) { ++ if (!str_to_ullong(str, 0, &value) || value > UINT32_MAX) { + return xasprintf("invalid numeric format %s", str); + } + *valuep = value; diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index 271105bdea..879275a7a3 100644 --- a/lib/ofpbuf.c @@ -63003,6 +63047,20 @@ index 651012bf06..7b41dc44bf 100644 # (Here's where we end up if it didn't.) # XXX rate-limit +diff --git a/python/ovs/stream.py b/python/ovs/stream.py +index ac5b0fd0c6..b32341076c 100644 +--- a/python/ovs/stream.py ++++ b/python/ovs/stream.py +@@ -824,7 +824,8 @@ class SSLStream(Stream): + self.socket.do_handshake() + except ssl.SSLWantReadError: + return errno.EAGAIN +- except ssl.SSLSyscallError as e: ++ except (ssl.SSLSyscallError, ssl.SSLZeroReturnError, ++ ssl.SSLEOFError, OSError) as e: + return ovs.socket_util.get_exception_errno(e) + + return 0 diff --git a/python/setup.py b/python/setup.py index cfe01763f3..36ced65089 100644 --- a/python/setup.py @@ -63221,6 +63279,20 @@ index 2bef06f39c..922185d61d 100644 OVS_VSWITCHD_STOP AT_CLEANUP +diff --git a/tests/automake.mk b/tests/automake.mk +index 8a9151f81b..269e8b9d2e 100644 +--- a/tests/automake.mk ++++ b/tests/automake.mk +@@ -109,7 +109,8 @@ TESTSUITE_AT = \ + tests/mcast-snooping.at \ + tests/packet-type-aware.at \ + tests/nsh.at \ +- tests/drop-stats.at ++ tests/drop-stats.at \ ++ tests/learning-switch.at + + EXTRA_DIST += $(FUZZ_REGRESSION_TESTS) + FUZZ_REGRESSION_TESTS = \ diff --git a/tests/classifier.at b/tests/classifier.at index cdcd72c156..de2705653e 100644 --- a/tests/classifier.at @@ -63902,6 +63974,35 @@ index 5f1d6df9de..d127fed348 100644 OFPT_FLOW_MOD (xid=0x6): ADD actions=learn(table=1,idle_timeout=10,hard_timeout=20,fin_idle_timeout=5,fin_hard_timeout=10,priority=10,cookie=0xfedcba9876543210,in_port=99,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG1[16..31]) OFPT_FLOW_MOD (xid=0x7): ADD actions=learn(table=1,limit=4096) OFPT_FLOW_MOD (xid=0x8): ADD actions=learn(table=1,limit=4096,result_dst=NXM_NX_REG0[0]) +diff --git a/tests/learning-switch.at b/tests/learning-switch.at +new file mode 100644 +index 0000000000..ac2fc1b801 +--- /dev/null ++++ b/tests/learning-switch.at +@@ -0,0 +1,23 @@ ++AT_BANNER([learning switch]) ++ ++### ----------------------------------------------------------------- ++### learning switch OpenFlow15 test case ++### ----------------------------------------------------------------- ++ ++AT_SETUP([learning switch - OpenFlow15]) ++dnl Start ovs-testcontroller ++AT_CHECK([ovs-testcontroller --no-chdir --detach punix:controller --pidfile -v ptcp:], [0], [ignore]) ++dnl Start ovs ++OVS_VSWITCHD_START([dnl ++ set bridge br0 datapath_type=dummy \ ++ protocols=OpenFlow15 -- \ ++ add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \ ++ set-controller br0 tcp:127.0.0.1:6653]) ++AT_CHECK([ ++ ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637 ++], [0], [ignore]) ++AT_CHECK([kill `cat ovs-testcontroller.pid`]) ++ ++OVS_WAIT_UNTIL([! test -e controller]) ++OVS_VSWITCHD_STOP(["/cannot find route for controller/d"]) ++AT_CLEANUP diff --git a/tests/library.at b/tests/library.at index db4997d8f0..6489be2c15 100644 --- a/tests/library.at @@ -70320,6 +70421,15 @@ index fc8ce4a2c0..96c89bd4e6 100644 #ifdef _WIN32 && error != WSAECONNRESET #endif +diff --git a/tests/testsuite.at b/tests/testsuite.at +index 58adfa09cf..57085074f1 100644 +--- a/tests/testsuite.at ++++ b/tests/testsuite.at +@@ -78,3 +78,4 @@ m4_include([tests/mcast-snooping.at]) + m4_include([tests/packet-type-aware.at]) + m4_include([tests/nsh.at]) + m4_include([tests/drop-stats.at]) ++m4_include([tests/learning-switch.at]) diff --git a/tests/tunnel-push-pop-ipv6.at b/tests/tunnel-push-pop-ipv6.at index 3f58e3e8fd..c96b77cd15 100644 --- a/tests/tunnel-push-pop-ipv6.at diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 67a8b7a..9744695 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -63,7 +63,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 93%{?dist} +Release: 95%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -749,6 +749,20 @@ exit 0 %endif %changelog +* Thu Apr 27 2023 Open vSwitch CI - 2.17.0-95 +- Merging upstream branch-2.17 [RH git: 4363c42c50] + Commit list: + cbe5852d76 python-stream: Handle SSL error in do_handshake. + + +* Tue Apr 25 2023 Open vSwitch CI - 2.17.0-94 +- Merging upstream branch-2.17 [RH git: 84a9f6dbc4] + Commit list: + be3caf4553 dpif-netlink: Fix memory leak dpif_netlink_open(). + b7e1593f4c ofp-parse: Check ranges on string to uint32_t conversion. + 70cb45c665 learning-switch: Fix coredump of OpenFlow15 learning-switch. + + * Mon Apr 24 2023 Open vSwitch CI - 2.17.0-93 - Merging upstream branch-2.17 [RH git: 69327ba475] Commit list: