diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index 83e6067..74f371b 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -297,9 +297,18 @@ index c9f7179c3..aed2c8fbb 100644 dpif_netdev_enumerate, dpif_netdev_port_open_type, diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c -index 026b0daa8..2f829f589 100644 +index 026b0daa8..dc56e863f 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c +@@ -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. @@ -2582,7 +2582,7 @@ dpif_netlink_calculate_n_handlers(void) n_handlers = MIN(next_prime_num, total_cores); } @@ -362,6 +371,18 @@ index 6cb4dae6d..129cbf6a1 100644 /* Log functions. */ struct vlog_module; +diff --git a/lib/learning-switch.c b/lib/learning-switch.c +index 8102475ca..cdf42935c 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/meta-flow.c b/lib/meta-flow.c index c576ae620..474344194 100644 --- a/lib/meta-flow.c @@ -553,6 +574,29 @@ index 4ad45ffa1..3fad501e3 100644 netdev->change_seq = 1; netdev->dev_type = info.ovs_type; netdev->port_no = info.port_no; +diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c +index a90b926ef..102b183a8 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/ovs-thread.c b/lib/ovs-thread.c index 2d382f1e8..ac5d2c3d0 100644 --- a/lib/ovs-thread.c @@ -1658,6 +1702,34 @@ index 01bb80e28..3c93ae580 100644 json_destroy(txn_json); t->reply = jsonrpc_create_reply(json_object_create(), t->request->id); +diff --git a/python/ovs/stream.py b/python/ovs/stream.py +index ac5b0fd0c..b32341076 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/tests/automake.mk b/tests/automake.mk +index c8de3fe28..e39453cd1 100644 +--- a/tests/automake.mk ++++ b/tests/automake.mk +@@ -110,7 +110,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 f652b5983..de2705653 100644 --- a/tests/classifier.at @@ -1757,6 +1829,35 @@ index f652b5983..de2705653 100644 AT_BANNER([flow classifier prefix lookup]) AT_SETUP([flow classifier - prefix lookup]) OVS_VSWITCHD_START +diff --git a/tests/learning-switch.at b/tests/learning-switch.at +new file mode 100644 +index 000000000..ac2fc1b80 +--- /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/ofproto-dpif.at b/tests/ofproto-dpif.at index fa6111c1e..6b58cabec 100644 --- a/tests/ofproto-dpif.at @@ -2430,6 +2531,15 @@ index 221d96aef..6678911b4 100644 OVS_WAIT_UNTIL([grep "listening" tcpdump1_err]) dnl Send UDP client->server +diff --git a/tests/testsuite.at b/tests/testsuite.at +index cf4e3eadf..9d77a9f51 100644 +--- a/tests/testsuite.at ++++ b/tests/testsuite.at +@@ -77,3 +77,4 @@ m4_include([tests/packet-type-aware.at]) + m4_include([tests/nsh.at]) + m4_include([tests/drop-stats.at]) + m4_include([tests/pytest.at]) ++m4_include([tests/learning-switch.at]) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index eabec18a3..3ce4e82ec 100644 --- a/utilities/ovs-ofctl.c diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 0a9c3ca..f644140 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -63,7 +63,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 22%{?dist} +Release: 24%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -757,6 +757,20 @@ exit 0 %endif %changelog +* Thu Apr 27 2023 Open vSwitch CI - 3.1.0-24 +- Merging upstream branch-3.1 [RH git: a9adae047c] + Commit list: + 29c61a4024 python-stream: Handle SSL error in do_handshake. + + +* Tue Apr 25 2023 Open vSwitch CI - 3.1.0-23 +- Merging upstream branch-3.1 [RH git: 9f3dc364af] + Commit list: + 615548e532 dpif-netlink: Fix memory leak dpif_netlink_open(). + 42edc9a1d5 ofp-parse: Check ranges on string to uint32_t conversion. + d3a479c4b4 learning-switch: Fix coredump of OpenFlow15 learning-switch. + + * Mon Apr 24 2023 Open vSwitch CI - 3.1.0-22 - Merging upstream branch-3.1 [RH git: 7629025902] Commit list: