Newer
Older
+v2.13.4 - 01 Jul 2021
+---------------------
+ - Bug fixes
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
+ - DPDK:
+ * OVS validated with DPDK 19.11.8. It is recommended to use this version
+ until further releases.
+ - ovs-ctl:
+ * New option '--no-record-hostname' to disable hostname configuration
+ in ovsdb on startup.
+ * New command 'record-hostname-if-not-set' to update hostname in ovsdb.
+
+v2.13.3 - 10 Feb 2021
+---------------------
+ - Bug fixes
+ - Security:
+ * Fixed packet parsing vulnerability CVE-2020-35498.
+
+v2.13.2 - 13 Jan 2021
+---------------------
+ - Bug fixes
+ - LLDP:
+ * Security fixes for CVE-2015-8011 and CVE-2020-27827.
+ - IPsec:
+ * Fixed support of strongswan 5.7+ in ovs-monitor-ipsec.
+ * Add option '--no-cleanup' to allow ovs-monitor-ipsec to stop without
+ tearing down IPsec tunnels.
+ * Add option '--no-restart-ike-daemon' to allow ovs-monitor-ipsec to start
+ without restarting ipsec daemon.
+ - OVSDB:
+ * New unixctl command 'ovsdb-server/memory-trim-on-compaction on|off'.
+ If turned on, ovsdb-server will try to reclaim all the unused memory
+ after every DB compaction back to OS. Disabled by default.
+ * Maximum backlog on RAFT connections limited to 500 messages or 4GB.
+ Once threshold reached, connection is dropped (and re-established).
+ Use the 'cluster/set-backlog-threshold' command to change limits.
+ * Fixed SHA-1 hash computation for databases larger than 512 MB.
+ - DPDK:
+ * Fixed support of 'net_virtio' devices.
+
+v2.13.1 - 30 Jul 2020
+---------------------
+ - Bug fixes
+ - DPDK:
+ * OVS validated with DPDK 19.11.2, due to the inclusion of fixes for
+ CVE-2020-10722, CVE-2020-10723, CVE-2020-10724, CVE-2020-10725 and
+ CVE-2020-10726, this DPDK version is strongly recommended to be used.
+
v2.13.0 - 14 Feb 2020
---------------------
- OVN:
- 'ovs-appctl dpctl/dump-flows' can now show offloaded=partial for
partially offloaded flows, dp:dpdk for fully offloaded by dpdk, and
type filter supports new filters: "dpdk" and "partially-offloaded".
+ - Add new argument '--offload-stats' for command
+ 'ovs-appctl bridge/dump-flows',
+ so it can display offloaded packets statistics.
v2.12.0 - 03 Sep 2019
---------------------
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
* Add support for conntrack zone-based timeout policy.
- 'ovs-dpctl dump-flows' is no longer suitable for dumping offloaded flows.
'ovs-appctl dpctl/dump-flows' should be used instead.
- - Add new argument '--offload-stats' for command
- 'ovs-appctl bridge/dump-flows',
- so it can display offloaded packets statistics.
- Add L2 GRE tunnel over IPv6 support.
v2.11.0 - 19 Feb 2019
diff --git a/README.rst b/README.rst
index e06ddf2671..8e64d74aee 100644
--- a/README.rst
+++ b/README.rst
@@ -6,8 +6,8 @@
Open vSwitch
============
-.. image:: https://travis-ci.org/openvswitch/ovs.png
- :target: https://travis-ci.org/openvswitch/ovs
+.. image:: https://github.com/openvswitch/ovs/workflows/Build%20and%20Test/badge.svg
+ :target: https://github.com/openvswitch/ovs/actions
.. image:: https://ci.appveyor.com/api/projects/status/github/openvswitch/ovs?branch=master&svg=true&retina=true
:target: https://ci.appveyor.com/project/blp/ovs/history
.. image:: https://api.cirrus-ci.com/github/openvswitch/ovs.svg
diff --git a/acinclude.m4 b/acinclude.m4
index c1470ccc6b..914e27b932 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -192,10 +192,10 @@ dnl Configure Linux tc compat.
AC_DEFUN([OVS_CHECK_LINUX_TC], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([#include <linux/pkt_cls.h>], [
- int x = TCA_ACT_FLAGS;
+ int x = TCA_FLOWER_KEY_CT_FLAGS_REPLY;
])],
- [AC_DEFINE([HAVE_TCA_ACT_FLAGS], [1],
- [Define to 1 if TCA_ACT_FLAGS is available.])])
+ [AC_DEFINE([HAVE_TCA_FLOWER_KEY_CT_FLAGS_REPLY], [1],
+ [Define to 1 if TCA_FLOWER_KEY_CT_FLAGS_REPLY is available.])])
AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include <linux/pkt_cls.h>])
@@ -250,6 +250,18 @@ AC_DEFUN([OVS_CHECK_LINUX_SCTP_CT], [
[Define to 1 if SCTP_CONNTRACK_HEARTBEAT_SENT is available.])])
])
+dnl OVS_CHECK_LINUX_VIRTIO_TYPES
+dnl
+dnl Checks for kernels that need virtio_types definition.
+AC_DEFUN([OVS_CHECK_LINUX_VIRTIO_TYPES], [
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([#include <linux/virtio_types.h>], [
+ __virtio16 x = 0;
+ ])],
+ [AC_DEFINE([HAVE_VIRTIO_TYPES], [1],
+ [Define to 1 if __virtio16 is available.])])
+])
+
dnl OVS_FIND_DEPENDENCY(FUNCTION, SEARCH_LIBS, NAME_TO_PRINT)
dnl
dnl Check for a function in a library list.
@@ -379,7 +391,6 @@ AC_DEFUN([OVS_CHECK_DPDK], [
[AC_MSG_RESULT([no])])
AC_CHECK_DECL([RTE_LIBRTE_MLX5_PMD], [dnl found
- OVS_FIND_DEPENDENCY([mnl_attr_put], [mnl], [libmnl])
AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
OVS_FIND_DEPENDENCY([mlx5dv_create_wq], [mlx5], [libmlx5])
OVS_FIND_DEPENDENCY([verbs_init_cq], [ibverbs], [libibverbs])
@@ -420,6 +431,16 @@ AC_DEFUN([OVS_CHECK_DPDK], [
if test "$DPDK_AUTO_DISCOVER" = "false"; then
OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR"
fi
+ # Stripping out possible instruction set specific configuration that DPDK
+ # forces in pkg-config since this could override user-specified options.
+ # It's enough to have -mssse3 to build with DPDK headers.
+ DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g')
+ # Also stripping out '-mno-avx512f'. Support for AVX512 will be disabled
+ # if OVS will detect that it's broken. OVS could be built with a
+ # completely different toolchain that correctly supports AVX512, flags
+ # forced by DPDK only breaks our feature detection mechanism and leads to
+ # build failures: https://github.com/openvswitch/ovs-issues/issues/201
+ DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-mno-avx512f//g')
OVS_CFLAGS="$OVS_CFLAGS $DPDK_INCLUDE"
OVS_ENABLE_OPTION([-mssse3])
@@ -567,9 +588,14 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/net/ip6_fib.h], [rt6_get_cookie],
[OVS_DEFINE([HAVE_RT6_GET_COOKIE])])
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/addrconf.h], [ipv6_stub],
+ [dst_entry])
OVS_GREP_IFELSE([$KSRC/include/net/addrconf.h], [ipv6_dst_lookup.*net],
[OVS_DEFINE([HAVE_IPV6_DST_LOOKUP_NET])])
+ OVS_GREP_IFELSE([$KSRC/include/net/addrconf.h], [ipv6_dst_lookup_flow.*net],
+ [OVS_DEFINE([HAVE_IPV6_DST_LOOKUP_FLOW_NET])])
OVS_GREP_IFELSE([$KSRC/include/net/addrconf.h], [ipv6_stub])
+ OVS_GREP_IFELSE([$KSRC/include/net/addrconf.h], [ipv6_dst_lookup_flow])
OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [ERR_CAST])
OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [IS_ERR_OR_NULL])
@@ -765,6 +791,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
[prandom_u32[[\(]]],
[OVS_DEFINE([HAVE_PRANDOM_U32])])
OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max])
+ OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h],
+ [prandom_u32[[\(]]],
+ [OVS_DEFINE([HAVE_PRANDOM_U32])])
+ OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h], [prandom_u32_max])
OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [get_link_net])
OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [name_assign_type])
@@ -918,8 +948,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/net/sock.h], [sk_no_check_tx])
OVS_GREP_IFELSE([$KSRC/include/linux/udp.h], [no_check6_tx])
- OVS_GREP_IFELSE([$KSRC/include/linux/utsrelease.h], [el6],
- [OVS_DEFINE([HAVE_RHEL6_PER_CPU])])
OVS_FIND_PARAM_IFELSE([$KSRC/include/net/protocol.h],
[udp_add_offload], [net],
[OVS_DEFINE([HAVE_UDP_ADD_OFFLOAD_TAKES_NET])])
@@ -1294,11 +1322,11 @@ AC_DEFUN([OVS_ENABLE_SPARSE],
dnl OVS_CTAGS_IDENTIFIERS
dnl
-dnl ctags ignores symbols with extras identifiers. This builds a list of
-dnl specially handled identifiers to be ignored.
+dnl ctags ignores symbols with extras identifiers. This is a list of
+dnl specially handled identifiers to be ignored. [ctags(1) -I <list>].
AC_DEFUN([OVS_CTAGS_IDENTIFIERS],
AC_SUBST([OVS_CTAGS_IDENTIFIERS_LIST],
- [`printf %s '-I "'; sed -n 's/^#define \(OVS_[A-Z_]\+\)(\.\.\.)$/\1+/p' ${srcdir}/include/openvswitch/compiler.h | tr \\\n ' ' ; printf '"'`] ))
+ ["OVS_LOCKABLE OVS_NO_THREAD_SAFETY_ANALYSIS OVS_REQ_RDLOCK+ OVS_ACQ_RDLOCK+ OVS_REQ_WRLOCK+ OVS_ACQ_WRLOCK+ OVS_REQUIRES+ OVS_ACQUIRES+ OVS_TRY_WRLOCK+ OVS_TRY_RDLOCK+ OVS_TRY_LOCK+ OVS_GUARDED_BY+ OVS_EXCLUDED+ OVS_RELEASES+ OVS_ACQ_BEFORE+ OVS_ACQ_AFTER+"]))
dnl OVS_PTHREAD_SET_NAME
dnl
diff --git a/build-aux/dist-docs b/build-aux/dist-docs
index f6b88ca2d0..9429702db9 100755
--- a/build-aux/dist-docs
+++ b/build-aux/dist-docs
@@ -43,7 +43,7 @@ rm -rf $distdir
mkdir $distdir
# Install manpages.
-${MAKE-make} install-man mandir="$abs_distdir"/man
+${MAKE-make} install-man install-man-rst mandir="$abs_distdir"/man
(cd $distdir && mv `find man -type f` . && rm -rf man)
manpages=`cd $distdir && echo *`
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
# limitations under the License.
AC_PREREQ(2.63)
-AC_INIT(openvswitch, 2.13.0, bugs@openvswitch.org)
AC_CONFIG_SRCDIR([datapath/datapath.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
@@ -100,6 +100,7 @@ OVS_CHECK_IF_DL
OVS_CHECK_STRTOK_R
OVS_CHECK_LINUX_AF_XDP
AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]])
+AC_CHECK_DECLS([malloc_trim], [], [], [[#include <malloc.h>]])
AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec],
[], [], [[#include <sys/stat.h>]])
AC_CHECK_MEMBERS([struct ifreq.ifr_flagshigh], [], [], [[#include <net/if.h>]])
@@ -188,6 +189,7 @@ OVS_CHECK_LINUX
OVS_CHECK_LINUX_NETLINK
OVS_CHECK_LINUX_TC
OVS_CHECK_LINUX_SCTP_CT
+OVS_CHECK_LINUX_VIRTIO_TYPES
OVS_CHECK_DPDK
OVS_CHECK_PRAGMA_MESSAGE
AC_SUBST([OVS_CFLAGS])
diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
@@ -1112,9 +1112,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx,
* should split the function and refactor. */
if (!bufferData) {
EthHdr *ethHdr = (EthHdr *)bufferStart;
- /* If the frame is not VLAN make it a no op */
if (ethHdr->Type != ETH_TYPE_802_1PQ_NBO) {
- return NDIS_STATUS_SUCCESS;
+ OVS_LOG_ERROR("Invalid ethHdr type %u, nbl %p", ethHdr->Type, ovsFwdCtx->curNbl);
+ return NDIS_STATUS_INVALID_PACKET;
}
}
RtlMoveMemory(bufferStart + shiftLength, bufferStart, shiftOffset);
@@ -1137,6 +1137,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx,
static __inline NDIS_STATUS
OvsPopVlanInPktBuf(OvsForwardingContext *ovsFwdCtx)
{
+ NDIS_STATUS status;
+ OVS_PACKET_HDR_INFO* layers = &ovsFwdCtx->layers;
+
/*
* Declare a dummy vlanTag structure since we need to compute the size
* of shiftLength. The NDIS one is a unionized structure.
@@ -1145,7 +1148,15 @@ OvsPopVlanInPktBuf(OvsForwardingContext *ovsFwdCtx)
UINT32 shiftLength = sizeof(vlanTag.TagHeader);
UINT32 shiftOffset = sizeof(DL_EUI48) + sizeof(DL_EUI48);
- return OvsPopFieldInPacketBuf(ovsFwdCtx, shiftOffset, shiftLength, NULL);
+ status = OvsPopFieldInPacketBuf(ovsFwdCtx, shiftOffset, shiftLength,
+ NULL);
+
+ if (status == NDIS_STATUS_SUCCESS) {
+ layers->l3Offset -= (UINT16) shiftLength;
+ layers->l4Offset -= (UINT16) shiftLength;
+ }
+
+ return status;
}
@@ -1259,6 +1270,7 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx,
*/
static __inline NDIS_STATUS
OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_ethernet *ethAttr)
{
PNET_BUFFER curNb;
@@ -1285,9 +1297,11 @@ OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx,
}
ethHdr = (EthHdr *)(bufferStart + NET_BUFFER_CURRENT_MDL_OFFSET(curNb));
- RtlCopyMemory(ethHdr->Destination, ethAttr->eth_dst,
- sizeof ethHdr->Destination);
- RtlCopyMemory(ethHdr->Source, ethAttr->eth_src, sizeof ethHdr->Source);
+ RtlCopyMemory(ethHdr->Destination, ethAttr->eth_dst, ETH_ADDR_LENGTH);
+ RtlCopyMemory(ethHdr->Source, ethAttr->eth_src, ETH_ADDR_LENGTH);
+ /* Update l2 flow key */
+ RtlCopyMemory(key->l2.dlDst, ethAttr->eth_dst, ETH_ADDR_LENGTH);
+ RtlCopyMemory(key->l2.dlSrc, ethAttr->eth_src, ETH_ADDR_LENGTH);
return NDIS_STATUS_SUCCESS;
}
@@ -1376,6 +1390,7 @@ PUINT8 OvsGetHeaderBySize(OvsForwardingContext *ovsFwdCtx,
*/
NDIS_STATUS
OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_udp *udpAttr)
{
PUINT8 bufferStart;
@@ -1400,15 +1415,19 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx,
udpHdr->check = ChecksumUpdate16(udpHdr->check, udpHdr->source,
udpAttr->udp_src);
udpHdr->source = udpAttr->udp_src;
+ key->ipKey.l4.tpSrc = udpAttr->udp_src;
}
if (udpHdr->dest != udpAttr->udp_dst) {
udpHdr->check = ChecksumUpdate16(udpHdr->check, udpHdr->dest,
udpAttr->udp_dst);
udpHdr->dest = udpAttr->udp_dst;
+ key->ipKey.l4.tpDst = udpAttr->udp_dst;
}
} else {
udpHdr->source = udpAttr->udp_src;
+ key->ipKey.l4.tpSrc = udpAttr->udp_src;
udpHdr->dest = udpAttr->udp_dst;
+ key->ipKey.l4.tpDst = udpAttr->udp_dst;
}
return NDIS_STATUS_SUCCESS;
@@ -1423,6 +1442,7 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx,
*/
NDIS_STATUS
OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_tcp *tcpAttr)
{
PUINT8 bufferStart;
@@ -1447,11 +1467,13 @@ OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx,
tcpHdr->check = ChecksumUpdate16(tcpHdr->check, tcpHdr->source,
tcpAttr->tcp_src);
tcpHdr->source = tcpAttr->tcp_src;
+ key->ipKey.l4.tpSrc = tcpAttr->tcp_src;
}
if (tcpHdr->dest != tcpAttr->tcp_dst) {
tcpHdr->check = ChecksumUpdate16(tcpHdr->check, tcpHdr->dest,
tcpAttr->tcp_dst);
tcpHdr->dest = tcpAttr->tcp_dst;
+ key->ipKey.l4.tpDst = tcpAttr->tcp_dst;
}
return NDIS_STATUS_SUCCESS;
@@ -1539,9 +1561,21 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx,
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
if (tcpHdr) {
portField = &tcpHdr->dest;
checkField = &tcpHdr->check;
+ l4Offload = isTx ? (BOOLEAN)csumInfo.Transmit.TcpChecksum :
+ ((BOOLEAN)csumInfo.Receive.TcpChecksumSucceeded ||
+ (BOOLEAN)csumInfo.Receive.TcpChecksumFailed);
} else if (udpHdr) {
portField = &udpHdr->dest;
checkField = &udpHdr->check;
+ l4Offload = isTx ? (BOOLEAN)csumInfo.Transmit.UdpChecksum :
+ ((BOOLEAN)csumInfo.Receive.UdpChecksumSucceeded ||
+ (BOOLEAN)csumInfo.Receive.UdpChecksumFailed);
+ }
+
+ if (l4Offload) {
+ *checkField = IPPseudoChecksum(&ipHdr->saddr, &newAddr,
+ tcpHdr ? IPPROTO_TCP : IPPROTO_UDP,
+ ntohs(ipHdr->tot_len) - ipHdr->ihl * 4);
}
}
@@ -1579,6 +1613,7 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx,
*/
NDIS_STATUS
OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_ipv4 *ipAttr)
{
PUINT8 bufferStart;
@@ -1632,6 +1667,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx,
ipAttr->ipv4_src);
}
ipHdr->saddr = ipAttr->ipv4_src;
+ key->ipKey.nwSrc = ipAttr->ipv4_src;
}
if (ipHdr->daddr != ipAttr->ipv4_dst) {
if (tcpHdr) {
@@ -1647,6 +1683,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx,
ipAttr->ipv4_dst);
}
ipHdr->daddr = ipAttr->ipv4_dst;
+ key->ipKey.nwDst = ipAttr->ipv4_dst;
}
if (ipHdr->protocol != ipAttr->ipv4_proto) {
UINT16 oldProto = (ipHdr->protocol << 16) & 0xff00;
@@ -1661,6 +1698,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx,
ipHdr->check = ChecksumUpdate16(ipHdr->check, oldProto, newProto);
}
ipHdr->protocol = ipAttr->ipv4_proto;
+ key->ipKey.nwProto = ipAttr->ipv4_proto;
}
if (ipHdr->ttl != ipAttr->ipv4_ttl) {
UINT16 oldTtl = (ipHdr->ttl) & 0xff;
@@ -1669,6 +1707,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx,
ipHdr->check = ChecksumUpdate16(ipHdr->check, oldTtl, newTtl);
}
ipHdr->ttl = ipAttr->ipv4_ttl;
+ key->ipKey.nwTtl = ipAttr->ipv4_ttl;
}
return NDIS_STATUS_SUCCESS;
@@ -1691,12 +1730,12 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx,
switch (type) {
case OVS_KEY_ATTR_ETHERNET:
- status = OvsUpdateEthHeader(ovsFwdCtx,
+ status = OvsUpdateEthHeader(ovsFwdCtx, key,
NlAttrGetUnspec(a, sizeof(struct ovs_key_ethernet)));
break;
case OVS_KEY_ATTR_IPV4:
- status = OvsUpdateIPv4Header(ovsFwdCtx,
+ status = OvsUpdateIPv4Header(ovsFwdCtx, key,
NlAttrGetUnspec(a, sizeof(struct ovs_key_ipv4)));
break;
@@ -1709,16 +1748,17 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx,
status = SUCCEEDED(convertStatus) ? NDIS_STATUS_SUCCESS : NDIS_STATUS_FAILURE;
ASSERT(status == NDIS_STATUS_SUCCESS);
RtlCopyMemory(&ovsFwdCtx->tunKey, &tunKey, sizeof ovsFwdCtx->tunKey);
+ RtlCopyMemory(&key->tunKey, &tunKey, sizeof key->tunKey);
break;
}
case OVS_KEY_ATTR_UDP:
- status = OvsUpdateUdpPorts(ovsFwdCtx,
+ status = OvsUpdateUdpPorts(ovsFwdCtx, key,
NlAttrGetUnspec(a, sizeof(struct ovs_key_udp)));
break;
case OVS_KEY_ATTR_TCP:
- status = OvsUpdateTcpPorts(ovsFwdCtx,
+ status = OvsUpdateTcpPorts(ovsFwdCtx, key,
NlAttrGetUnspec(a, sizeof(struct ovs_key_tcp)));
break;
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
@@ -1763,9 +1803,11 @@ OvsExecuteRecirc(OvsForwardingContext *ovsFwdCtx,
}
if (newNbl) {
- deferredAction = OvsAddDeferredActions(newNbl, key, NULL);
+ deferredAction = OvsAddDeferredActions(newNbl, key, &(ovsFwdCtx->layers),
+ NULL);
} else {
- deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key, NULL);
+ deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key,
+ &(ovsFwdCtx->layers), NULL);
}
if (deferredAction) {
@@ -1917,7 +1959,7 @@ OvsExecuteSampleAction(OvsForwardingContext *ovsFwdCtx,
return STATUS_SUCCESS;
}
- if (!OvsAddDeferredActions(newNbl, key, a)) {
+ if (!OvsAddDeferredActions(newNbl, key, &(ovsFwdCtx->layers), a)) {
OVS_LOG_INFO(
"Deferred actions limit reached, dropping sample action.");
OvsCompleteNBL(ovsFwdCtx->switchContext, newNbl, TRUE);
@@ -2053,6 +2095,7 @@ OvsDoExecuteActions(POVS_SWITCH_CONTEXT switchContext,
*/
status = OvsPopVlanInPktBuf(&ovsFwdCtx);
if (status != NDIS_STATUS_SUCCESS) {
+ OVS_LOG_ERROR("OVS-pop vlan action failed status = %lu", status);
dropReason = L"OVS-pop vlan action failed";
goto dropit;
}
@@ -2302,7 +2345,7 @@ OvsActionsExecute(POVS_SWITCH_CONTEXT switchContext,
if (status == STATUS_SUCCESS) {
status = OvsProcessDeferredActions(switchContext, completionList,
- portNo, sendFlags, layers);
+ portNo, sendFlags, NULL);
}
return status;
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
diff --git a/datapath-windows/ovsext/Actions.h b/datapath-windows/ovsext/Actions.h
index fd050d5dd8..bc12e1166d 100644
--- a/datapath-windows/ovsext/Actions.h
+++ b/datapath-windows/ovsext/Actions.h
@@ -115,14 +115,17 @@ PUINT8 OvsGetHeaderBySize(OvsForwardingContext *ovsFwdCtx,
NDIS_STATUS
OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_udp *udpAttr);
NDIS_STATUS
OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_tcp *tcpAttr);
NDIS_STATUS
OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx,
+ OvsFlowKey *key,
const struct ovs_key_ipv4 *ipAttr);
NDIS_STATUS
diff --git a/datapath-windows/ovsext/Conntrack-other.c b/datapath-windows/ovsext/Conntrack-other.c
index 962cc8ac65..8580415a6b 100644
--- a/datapath-windows/ovsext/Conntrack-other.c
+++ b/datapath-windows/ovsext/Conntrack-other.c
@@ -49,17 +49,19 @@ OvsConntrackUpdateOtherEntry(OVS_CT_ENTRY *conn_,
{
ASSERT(conn_);
struct conn_other *conn = OvsCastConntrackEntryToOtherEntry(conn_);
+ enum CT_UPDATE_RES ret = CT_UPDATE_VALID;
if (reply && conn->state != OTHERS_BIDIR) {
conn->state = OTHERS_BIDIR;
} else if (conn->state == OTHERS_FIRST) {
conn->state = OTHERS_MULTIPLE;
+ ret = CT_UPDATE_VALID_NEW;
}
OvsConntrackUpdateExpiration(&conn->up, now,
other_timeouts[conn->state]);
- return CT_UPDATE_VALID;
+ return ret;
}
OVS_CT_ENTRY *
diff --git a/datapath-windows/ovsext/Conntrack-tcp.c b/datapath-windows/ovsext/Conntrack-tcp.c
index eda42ac823..a468c3e6bc 100644
--- a/datapath-windows/ovsext/Conntrack-tcp.c
+++ b/datapath-windows/ovsext/Conntrack-tcp.c
@@ -213,11 +213,17 @@ OvsConntrackUpdateTcpEntry(OVS_CT_ENTRY* conn_,
return CT_UPDATE_INVALID;
}
- if (((tcp_flags & (TCP_SYN|TCP_ACK)) == TCP_SYN)
- && dst->state >= CT_DPIF_TCPS_FIN_WAIT_2
+ if ((tcp_flags & (TCP_SYN|TCP_ACK)) == TCP_SYN) {
+ if (dst->state >= CT_DPIF_TCPS_FIN_WAIT_2
&& src->state >= CT_DPIF_TCPS_FIN_WAIT_2) {
- src->state = dst->state = CT_DPIF_TCPS_CLOSED;
- return CT_UPDATE_NEW;
+ src->state = dst->state = CT_DPIF_TCPS_CLOSED;
+ return CT_UPDATE_NEW;
+ } else if (src->state <= CT_DPIF_TCPS_SYN_SENT) {
+ src->state = CT_DPIF_TCPS_SYN_SENT;
+ OvsConntrackUpdateExpiration(&conn->up, now,
+ 30 * CT_INTERVAL_SEC);
+ return CT_UPDATE_VALID_NEW;
+ }
}
if (src->wscale & CT_WSCALE_FLAG
diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c
index ba5611697a..55917c43ff 100644
--- a/datapath-windows/ovsext/Conntrack.c
+++ b/datapath-windows/ovsext/Conntrack.c
@@ -753,6 +753,9 @@ OvsProcessConntrackEntry(OvsForwardingContext *fwdCtx,
return NULL;
}
break;
+ case CT_UPDATE_VALID_NEW:
+ state |= OVS_CS_F_NEW;
+ break;
}
}
if (entry) {
diff --git a/datapath-windows/ovsext/Conntrack.h b/datapath-windows/ovsext/Conntrack.h
index bc6580d708..b0932186af 100644
--- a/datapath-windows/ovsext/Conntrack.h
+++ b/datapath-windows/ovsext/Conntrack.h
@@ -56,6 +56,7 @@ typedef enum CT_UPDATE_RES {
CT_UPDATE_INVALID,
CT_UPDATE_VALID,
CT_UPDATE_NEW,
+ CT_UPDATE_VALID_NEW,
} CT_UPDATE_RES;
/* Metadata mark for masked write to conntrack mark */
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
diff --git a/datapath-windows/ovsext/Recirc.c b/datapath-windows/ovsext/Recirc.c
index 2febf060dd..a32b75352b 100644
--- a/datapath-windows/ovsext/Recirc.c
+++ b/datapath-windows/ovsext/Recirc.c
@@ -277,16 +277,23 @@ OvsDeferredActionsQueuePush(POVS_DEFERRED_ACTION_QUEUE queue)
POVS_DEFERRED_ACTION
OvsAddDeferredActions(PNET_BUFFER_LIST nbl,
OvsFlowKey *key,
+ POVS_PACKET_HDR_INFO layers,
const PNL_ATTR actions)
{
POVS_DEFERRED_ACTION_QUEUE queue = OvsDeferredActionsQueueGet();
POVS_DEFERRED_ACTION deferredAction = NULL;
+ OVS_PACKET_HDR_INFO layersInit = { 0 };
deferredAction = OvsDeferredActionsQueuePush(queue);
if (deferredAction) {
deferredAction->nbl = nbl;
deferredAction->actions = actions;
deferredAction->key = *key;
+ if (layers) {
+ deferredAction->layers = *layers;
+ } else {
+ deferredAction->layers = layersInit;
+ }
}
return deferredAction;
@@ -309,9 +316,16 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
POVS_DEFERRED_ACTION_QUEUE queue = OvsDeferredActionsQueueGet();
POVS_DEFERRED_ACTION deferredAction = NULL;
+ POVS_PACKET_HDR_INFO layersDeferred = NULL;
/* Process all deferred actions. */
while ((deferredAction = OvsDeferredActionsQueuePop(queue)) != NULL) {
+ if (layers) {
+ layersDeferred = layers;
+ } else {
+ layersDeferred = &(deferredAction->layers);
+ }
+
if (deferredAction->actions) {
status = OvsDoExecuteActions(switchContext,
completionList,
@@ -319,7 +333,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
portNo,
sendFlags,
&deferredAction->key, NULL,
- layers, deferredAction->actions,
+ layersDeferred, deferredAction->actions,
NlAttrGetSize(deferredAction->actions));
} else {
status = OvsDoRecirc(switchContext,
@@ -327,7 +341,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
deferredAction->nbl,
&deferredAction->key,
portNo,
- layers);
+ layersDeferred);
}
}
diff --git a/datapath-windows/ovsext/Recirc.h b/datapath-windows/ovsext/Recirc.h
index 2b314ce274..74130a4600 100644
--- a/datapath-windows/ovsext/Recirc.h
+++ b/datapath-windows/ovsext/Recirc.h
@@ -18,6 +18,7 @@
#define __RECIRC_H_ 1
#include "Actions.h"
+#include "NetProto.h"
#define DEFERRED_ACTION_QUEUE_SIZE 10
#define DEFERRED_ACTION_EXEC_LEVEL 4
@@ -26,6 +27,7 @@ typedef struct _OVS_DEFERRED_ACTION {
PNET_BUFFER_LIST nbl;
PNL_ATTR actions;
OvsFlowKey key;
+ OVS_PACKET_HDR_INFO layers;
} OVS_DEFERRED_ACTION, *POVS_DEFERRED_ACTION;
/*
@@ -52,6 +54,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
POVS_DEFERRED_ACTION
OvsAddDeferredActions(PNET_BUFFER_LIST packet,
OvsFlowKey *key,
+ POVS_PACKET_HDR_INFO layers,
const PNL_ATTR actions);
/*
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index d50a126b43..18f884f41b 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -192,22 +192,39 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
<CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
<ClCompile>
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
diff --git a/datapath/conntrack.c b/datapath/conntrack.c
index 838cf63c90..67e0628703 100644
--- a/datapath/conntrack.c
+++ b/datapath/conntrack.c
@@ -1972,7 +1972,8 @@ static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net)
struct hlist_head *head = &info->limits[i];
struct ovs_ct_limit *ct_limit;
- hlist_for_each_entry_rcu(ct_limit, head, hlist_node)
+ hlist_for_each_entry_rcu(ct_limit, head, hlist_node,
+ lockdep_ovsl_is_held())
kfree_rcu(ct_limit, rcu);
}
kfree(ovs_net->ct_limit_info->limits);
diff --git a/datapath/datapath.c b/datapath/datapath.c
index 853bfb5af1..3dbdb5b59c 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -2437,8 +2437,10 @@ static void __net_exit ovs_exit_net(struct net *dnet)
ovs_netns_frags6_exit(dnet);
ovs_netns_frags_exit(dnet);
- ovs_ct_exit(dnet);
ovs_lock();
+
+ ovs_ct_exit(dnet);
+
list_for_each_entry_safe(dp, dp_next, &ovs_net->dps, list_node)
__dp_destroy(dp);
diff --git a/datapath/linux/compat/geneve.c b/datapath/linux/compat/geneve.c
index c044b14896..bf995aa83a 100644
--- a/datapath/linux/compat/geneve.c
+++ b/datapath/linux/compat/geneve.c
@@ -962,14 +962,26 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb,
return dst;
}
-#ifdef HAVE_IPV6_DST_LOOKUP_NET
- if (ipv6_stub->ipv6_dst_lookup(geneve->net, gs6->sock->sk, &dst, fl6)) {
+#if defined(HAVE_IPV6_STUB_WITH_DST_ENTRY) && defined(HAVE_IPV6_DST_LOOKUP_FLOW)
+#ifdef HAVE_IPV6_DST_LOOKUP_FLOW_NET
+ dst = ipv6_stub->ipv6_dst_lookup_flow(geneve->net, gs6->sock->sk, fl6,
+ NULL);
#else
-#ifdef HAVE_IPV6_STUB
+ dst = ipv6_stub->ipv6_dst_lookup_flow(gs6->sock->sk, fl6,
+ NULL);
+#endif
+ if (IS_ERR(dst)) {
+#elif defined(HAVE_IPV6_DST_LOOKUP_FLOW_NET)
+ if (ipv6_stub->ipv6_dst_lookup_flow(geneve->net, gs6->sock->sk, &dst,
+ fl6)) {
+#elif defined(HAVE_IPV6_DST_LOOKUP_FLOW)
+ if (ipv6_stub->ipv6_dst_lookup_flow(gs6->sock->sk, &dst, fl6)) {
+#elif defined(HAVE_IPV6_DST_LOOKUP_NET)
+ if (ipv6_stub->ipv6_dst_lookup(geneve->net, gs6->sock->sk, &dst, fl6)) {
+#elif defined(HAVE_IPV6_STUB)
if (ipv6_stub->ipv6_dst_lookup(gs6->sock->sk, &dst, fl6)) {
#else
if (ip6_dst_lookup(gs6->sock->sk, &dst, fl6)) {
-#endif
#endif
netdev_dbg(dev, "no route to %pI6\n", &fl6->daddr);
return ERR_PTR(-ENETUNREACH);
diff --git a/datapath/linux/compat/include/linux/percpu.h b/datapath/linux/compat/include/linux/percpu.h
index 7c346aa31a..a039142e22 100644
--- a/datapath/linux/compat/include/linux/percpu.h
+++ b/datapath/linux/compat/include/linux/percpu.h
@@ -7,12 +7,6 @@
#define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
#endif
-#ifdef HAVE_RHEL6_PER_CPU
-#undef this_cpu_read
-#undef this_cpu_inc
-#undef this_cpu_dec
-#endif
-
#if !defined this_cpu_read
#define this_cpu_read(ptr) percpu_read(ptr)
#endif
diff --git a/datapath/linux/compat/include/linux/rculist.h b/datapath/linux/compat/include/linux/rculist.h
index 8df8ad8a27..40fd5e1710 100644
--- a/datapath/linux/compat/include/linux/rculist.h
+++ b/datapath/linux/compat/include/linux/rculist.h
@@ -9,9 +9,28 @@
#define hlist_pprev_rcu(node) (*((struct hlist_node __rcu **)((node)->pprev)))
#endif
+/*
+ * Check during list traversal that we are within an RCU reader
+ */
+
+#define check_arg_count_one(dummy)
+
+#ifdef CONFIG_PROVE_RCU_LIST
+#define __list_check_rcu(dummy, cond, extra...) \
+ ({ \
+ check_arg_count_one(extra); \
+ RCU_LOCKDEP_WARN(!cond && !rcu_read_lock_any_held(), \
+ "RCU-list traversed in non-reader section!"); \
+ })
+#else
+#define __list_check_rcu(dummy, cond, extra...) \
+ ({ check_arg_count_one(extra); })
+#endif
+
#undef hlist_for_each_entry_rcu
-#define hlist_for_each_entry_rcu(pos, head, member) \
- for (pos = hlist_entry_safe (rcu_dereference_raw(hlist_first_rcu(head)),\
+#define hlist_for_each_entry_rcu(pos, head, member, cond...) \
+ for (__list_check_rcu(dummy, ## cond, 0), \
+ pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
typeof(*(pos)), member); \
pos; \
pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(\
diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h
index 63972891bf..f276898b20 100644
--- a/datapath/linux/compat/include/linux/skbuff.h
+++ b/datapath/linux/compat/include/linux/skbuff.h
@@ -278,7 +278,7 @@ static inline void skb_clear_hash(struct sk_buff *skb)
#ifdef HAVE_RXHASH
skb->rxhash = 0;
#endif
-#if defined(HAVE_L4_RXHASH) && !defined(HAVE_RHEL_OVS_HOOK)
+#if defined(HAVE_L4_RXHASH)
skb->l4_rxhash = 0;
#endif
}
diff --git a/datapath/linux/compat/nf_conntrack_reasm.c b/datapath/linux/compat/nf_conntrack_reasm.c
index ced9fba98b..77b4b25485 100644
--- a/datapath/linux/compat/nf_conntrack_reasm.c
+++ b/datapath/linux/compat/nf_conntrack_reasm.c
@@ -57,10 +57,13 @@
#include <net/netns/generic.h>
#include "datapath.h"
-#ifdef OVS_NF_DEFRAG6_BACKPORT
+#if defined(HAVE_INET_FRAGS_WITH_FRAGS_WORK) || !defined(HAVE_INET_FRAGS_RND)
static const char nf_frags_cache_name[] = "ovs-frag6";
+#endif
+
+#ifdef OVS_NF_DEFRAG6_BACKPORT
struct nf_ct_frag6_skb_cb
{
struct inet6_skb_parm h;
diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
index 23118e8b63..05ccfb9288 100644
--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -967,7 +967,10 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
bool use_cache = (dst_cache && ip_tunnel_dst_cache_usable(skb, info));
struct dst_entry *ndst;
struct flowi6 fl6;
+#if !defined(HAVE_IPV6_STUB_WITH_DST_ENTRY) || \
+ !defined(HAVE_IPV6_DST_LOOKUP_FLOW)
int err;
+#endif
if (!sock6)
return ERR_PTR(-EIO);
@@ -990,20 +993,35 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
fl6.fl6_dport = dport;
fl6.fl6_sport = sport;
-#ifdef HAVE_IPV6_DST_LOOKUP_NET
- err = ipv6_stub->ipv6_dst_lookup(vxlan->net,
- sock6->sock->sk,
- &ndst, &fl6);
+#if defined(HAVE_IPV6_STUB_WITH_DST_ENTRY) && defined(HAVE_IPV6_DST_LOOKUP_FLOW)
+#ifdef HAVE_IPV6_DST_LOOKUP_FLOW_NET
+ ndst = ipv6_stub->ipv6_dst_lookup_flow(vxlan->net, sock6->sock->sk,
+ &fl6, NULL);
#else
-#ifdef HAVE_IPV6_STUB
+ ndst = ipv6_stub->ipv6_dst_lookup_flow(sock6->sock->sk, &fl6, NULL);
+#endif
+ if (unlikely(IS_ERR(ndst))) {
+#elif defined(HAVE_IPV6_DST_LOOKUP_FLOW_NET)
+ err = ipv6_stub->ipv6_dst_lookup_flow(vxlan->net, sock6->sock->sk,
+ &ndst, &fl6);
+#elif defined(HAVE_IPV6_DST_LOOKUP_FLOW)
+ err = ipv6_stub->ipv6_dst_lookup_flow(sock6->sock->sk, &ndst, &fl6);
+#elif defined(HAVE_IPV6_DST_LOOKUP_NET)
+ err = ipv6_stub->ipv6_dst_lookup(vxlan->net, sock6->sock->sk,
+ &ndst, &fl6);
+#elif defined(HAVE_IPV6_STUB)
err = ipv6_stub->ipv6_dst_lookup(vxlan->vn6_sock->sock->sk,
&ndst, &fl6);
#else
err = ip6_dst_lookup(vxlan->vn6_sock->sock->sk, &ndst, &fl6);
#endif
-#endif
+#if defined(HAVE_IPV6_STUB_WITH_DST_ENTRY) && defined(HAVE_IPV6_DST_LOOKUP_FLOW)
+ return ERR_PTR(-ENETUNREACH);
+ }
+#else
if (err < 0)
return ERR_PTR(err);
+#endif
*saddr = fl6.saddr;
if (use_cache)
diff --git a/debian/changelog b/debian/changelog
@@ -1,3 +1,33 @@
+openvswitch (2.13.5-1) unstable; urgency=low
+ [ Open vSwitch team ]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Thu, 01 Jul 2021 20:17:41 +0200
+
+openvswitch (2.13.4-1) unstable; urgency=low
+ [ Open vSwitch team ]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Thu, 01 Jul 2021 20:17:41 +0200
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
+
+openvswitch (2.13.3-1) unstable; urgency=low
+ [ Open vSwitch team ]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Wed, 10 Feb 2021 16:07:28 +0100
+
+openvswitch (2.13.2-1) unstable; urgency=low
+ [ Open vSwitch team ]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Wed, 13 Jan 2021 11:26:36 -0500
+
+openvswitch (2.13.1-1) unstable; urgency=low
+ [ Open vSwitch team]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Thu, 30 Jul 2020 00:25:23 +0200
+
openvswitch (2.13.0-1) unstable; urgency=low
[ Open vSwitch team]
* New upstream version
diff --git a/debian/control b/debian/control
index a50e97249f..6420b9d3e2 100644
--- a/debian/control
+++ b/debian/control
@@ -14,8 +14,9 @@ Build-Depends: graphviz,
openssl,
procps,
python3-all,
- python3-twisted-conch,
- python3-zopeinterface,
+ python3-sphinx,
+ python3-twisted,
+ python3-zope.interface,
libunbound-dev,
libunwind-dev
Standards-Version: 3.9.3
@@ -187,7 +188,7 @@ Description: Python bindings for Open vSwitch
Package: openvswitch-test
Architecture: all
Depends: python3,
- python3-twisted-web,
+ python3-twisted,
${misc:Depends},
${python3:Depends}
Description: Open vSwitch test package
diff --git a/debian/openvswitch-common.manpages b/debian/openvswitch-common.manpages
index 9ac6a1dd6d..95004122cc 100644
--- a/debian/openvswitch-common.manpages
+++ b/debian/openvswitch-common.manpages
@@ -1,7 +1,7 @@