9444 Commits

Author SHA1 Message Date
Filip Tehlar
49de3282a3 ikev2: fix memleak when tunnel protect fails
Type: fix

Change-Id: I1d278fc2b03b948c054ff1686315635ac0278ae8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 727082016f8822edcf40662d0059d3e8fab5e2ef)
2020-11-26 15:02:41 +00:00
Filip Tehlar
29ad98844b ikev2: add tests for DPD
Type: test

Change-Id: I9c1129a8596344551f3f8f2e029846d22511482e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 2008e314537500975acbd666e38d3fa6e7261bf5)
2020-11-26 15:02:41 +00:00
Filip Tehlar
6d878f3e61 ikev2: fix msg IDs generation
Type: fix

Change-Id: Id922895c269f0d2450e55fcb6871b6857f443462
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit f6b02e0d0bfd7e0f1d79e8ee426f48ca37ae5ff3)
2020-11-26 15:02:41 +00:00
Filip Tehlar
cbc3dc0b30 ikev2: fix udp encap
Type: fix

Change-Id: I8c66f79f2d8cfff7c6d45e1fc5b529ffb3941491
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 67b8a7fa76d8ec2d73f1b2380e11bf8e2793448e)
2020-11-26 15:02:41 +00:00
Filip Tehlar
8035ffe8dc ikev2: add option to disable NAT traversal
Type: feature
Ticket: VPP-1935

Change-Id: I705f84047b112279377590157a1c7b4a34f693d2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit d7fc12f07313f9147159f2562f6fcc928af7a963)
2020-11-26 15:02:41 +00:00
Filip Tehlar
f6deabd4fc ikev2: fix reply during rekey
Type: fix

Change-Id: If87f4b8ae92508215fe91178958fe2ddb91e5a35
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 68ad6258374201ba8f0dc052e6f44d6250555249)
2020-11-26 15:02:41 +00:00
Filip Tehlar
31b44a7a13 ikev2: increase tick interval in process node
This helps to resolve sporadic failures in unit tests.

Type: fix

Change-Id: I3abd77ed74310f9729a841e8569eafe6d7758dcb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 761f8f0eaaf43f38fdd9d160ba19ff833de7d210)
2020-11-26 15:02:41 +00:00
Filip Tehlar
56d712533b ikev2: cli for disabling dead peer detection
Type: feature

Change-Id: I0db0a9b2f872753fa64d27335838cb34645a9ee8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit af4a414eb74d1456121023e6b3aa76af6c16f89a)
2020-11-26 15:02:41 +00:00
Filip Tehlar
f7fd0e749b ikev2: fix memory leak
Type: fix

Change-Id: I33c38c791cc9a28898de402ae831c4862073eb2d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit b8bc2f1ef3332a795880f11f1c45a77b1b7851f6)
2020-11-26 15:02:41 +00:00
Filip Tehlar
a81bcf3945 ikev2: support sending requests from responder
Type: improvement
Ticket: VPP-1894

Change-Id: I5a24a48416bca2ffbd346cdaa813fb25801e6c9b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit edf2900ac633ae0d8575b04094b1bca40e1a221f)
2020-11-26 15:02:41 +00:00
Filip Tehlar
233b12d11d ikev2: fix setting responder/initiator addresses
Type: fix

Change-Id: Ic406aa914d92e802a5fb0f27c2ffa1b98db012b0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit ec112e5a9eb708c1ee85faf569fef6fa40178294)
2020-11-26 15:02:41 +00:00
Filip Tehlar
83c70b7a5a ikev2: prevent crash after no IP address
Type: fix
Ticket: VPP-1900

This fixes a crash when initiating IKE connection using interface
without any IP address.
It also ensures that the IKE connection is automatically retried once the
interface obtains an address.

Signed-off-by: jan_cavojsky <Jan.Cavojsky@pantheon.tech>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ia1919c349e64b3a0a4198365e075e177e3ba3de5
(cherry picked from commit 6960da528443ea40b1cdab323c76f978f7b16a8b)
2020-11-26 15:02:41 +00:00
Filip Tehlar
8b69f7546e ikev2: fix initial contact cleanup
When looking for existing SA connection to clean up search all per
thread data, not only current one.

Type: fix

Change-Id: I59312e08a07ca1f474b6389999e59320c5128e7d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit e7c8396982607634b4c747870499671ffa53868e)
2020-11-26 15:02:41 +00:00
Filip Tehlar
3ff88076d3 ikev2: fix coverity warning
Type: fix

Change-Id: Iee96b3ea3e71ec248c3c3c98d153a08372b5faf0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit dc6378f71bc7c9835845a91dbbc1646ea46df51e)
2020-11-26 15:02:41 +00:00
Filip Tehlar
ae0d24f1be ikev2: fix memory leak in auth routine
Type: fix

Change-Id: I93529b069925fcef32cdb22e27975b802b4c3b97
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 623d87fd39c53e2f4d8718014e76836fe07c4245)
2020-11-26 15:02:41 +00:00
Filip Tehlar
469181845b ikev2: support ipv6 traffic selectors & overlay
Ticket: VPP-1917
Type: feature

Change-Id: Ie9f22e7336aa7807b1967c48de9843df10fb575c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 84962d19ba76eafd5c7658aa86ec61c9b81f7702)
2020-11-26 15:02:41 +00:00
Filip Tehlar
0b685565c1 ikev2: refactor ikev2 node
Type: refactor

Change-Id: I65acbd5d9724c500a24699de973df08016d9d8d6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 3434cb8fe379791050a85617775bb518cdd0eb5d)
2020-11-26 15:02:41 +00:00
Filip Tehlar
df61e60815 ikev2: better packet parsing functions
Ticket: VPP-1918
Type: improvement

Change-Id: I2bc3e30121697404dcd54f1c2127bd85ccc1029e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 558607dc3a96232191f413b9bc894524ff85f2a1)
2020-11-26 15:02:41 +00:00
Filip Tehlar
447f673e75 ikev2: show IKE SA command improvements
Ticket: VPP-1898
Type: improvement

Change-Id: I1c56df331965c733a2d0eae63a12d5a4ee5a2e41
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 90690f1e8f39904990b4eeeb7851b248a9c908f3)
2020-11-26 15:02:41 +00:00
Benoît Ganne
7d304405ed dns: use correct per-thread vlib_main
Using vlib_main of another thread is prohibited.

Type: fix

Change-Id: I7ae294dfaf2526738e91408c9b4865ef9f801b8a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 7483a7272d15354486371be7a20c4bf35ab2eb38)
2020-11-26 14:56:28 +00:00
Benoît Ganne
7946c61c55 syslog: use per-thread vlib_main
We should not use main thread vlib_main in workers.

Type: fix

Change-Id: I58c0a8cadf2dc7f768b20ac90e7ec7921e2e8ca4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 0a2fde105a5a0c996333d67d2901b4eaedf7cbe1)
2020-11-26 13:10:42 +00:00
Benoît Ganne
c646d54b46 dns: fix double-unlock
dns cache should no longer be unlocked by caller.

Type: fix
Fixes: 84a563ae4050cc0389dcd438fbe9ea882f2b8404

Change-Id: I3708718ae8f00e4e4f4e04381caa0095c8494b82
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 2113c7f28b154df16af3637f67484971759a00a7)
2020-11-25 17:55:06 +00:00
Ray Kinsella
a6a5031e78 crypto-native: fix multi-arch variant initialization
crypto_native/main.h is being built as default,
and crypto_native_main is initialized with a size of 64 bytes.

crypto_native/aes_gcm.c and crypto_native/aes_cbc.c are march
variants, their ICL variants are expecting crypto_native_main
to be 256 bytes.

Type: fix

Signed-off-by: Georgii Tkachuk <georgii.tkachuk@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I4cddb75b712ea83c9cfca621887605d7bae104ec
2020-11-13 10:26:48 +00:00
Benoît Ganne
1e0e3d55a8 ipsec: add support for tx-table-id in cli + example
Type: improvement

Change-Id: I840741dfe040718b682935cdbcb0ba958d45a591
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 40aa27ef7cf63daa11974d0b06ea9ee1a102cb32)
2020-11-12 12:33:34 +00:00
Benoît Ganne
e36b854a72 feature: reset interface feature arc on interface deletion
When removing an interface we must reset all per-interface per-feature
arc data to ensure we do not get wrong feature arc config data when the
sw_if_index is recycled.

Type: fix

Change-Id: I8c9d850d7c62b7b77193da4258ab5fb9bdda85a6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 6178bdafa6a318d50cc8ad82f07c6c798c7024ef)
2020-11-12 12:33:31 +00:00
Benoît Ganne
087d81dafa af_xdp: fix NUMA node parsing
Non-NUMA systems might report -1 as NUMA node.

Type: fix

Change-Id: I092c817ea670009d6f530cc70ad13d45e15fd363
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4317b8efb1c4a4163b2585b9abd71ec38cd0862c)
2020-11-12 12:33:28 +00:00
Benoît Ganne
73a3476602 wireguard: reset secret data before freeing it
Type: fix

Change-Id: I880bdd55ae5da0b9775a3fb548d44512348a7bc6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 2531d50101991011fb1c7755d48f11b41f092628)
2020-11-12 12:33:25 +00:00
Benoît Ganne
07aeedd242 vpp: fix main heap init
NUMA node parsing with vlib_get_thread_core_numa() can failed on single
socket systems. Use clib_get_current_numa_node() instead as we already
pinned the main thread to the requested core.

Type: fix

Change-Id: I22339516d0305689a58584c92ded7c96eb53be39
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 33ce5e568f8b4fb1254bf5ee32865e9443c0185a)
2020-11-12 12:33:22 +00:00
Benoît Ganne
020f02cf3d ipsec: fix unformat types
ipsec_{crypto,integ}_alg_t are packed and smaller than u32. Callers are
using those enums so unformat functions should too instead of u32 to
not overflow the stack.

Type: fix

Change-Id: Ifc86366f1928ca6352f06f390a88ac64668289d5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit f6422ffbc82c55f50d06c8c7a2e230db7001ee35)
2020-11-12 12:33:18 +00:00
Benoît Ganne
b2a92ff3b9 svm: fix fifo unit test
- fix fifo initialization overflowing chunk size
 - stick to the default base virtual address to initialize fifo. ASAN
   can be picky about address space

Type: fix

Change-Id: If9a29138d2c207859d72845e928290c808c4a982
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 07b94558087facbb16c0fa82a79fcbbd9b44c485)
2020-11-12 12:33:15 +00:00
Benoît Ganne
19b477f977 ikev2: fix cli memory leak
Type: fix

Change-Id: Ibdd83fa336427ec0c66224ecebb1b6bd36d1d1ba
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 1f6a6b8b2b4efd4d6735ffd6fa683a0190f232e2)
2020-11-12 12:33:12 +00:00
Benoît Ganne
32c2b2ae60 rdma: add RSS support for IPv6 and TCP
Type: feature

Change-Id: I8b0d918e6f13325954b29bf34e4ef224c1315c51
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 91603958d1d4fc3114739f9b264808940942e5c8)
2020-11-12 12:33:09 +00:00
Benoît Ganne
9c73329588 build: better detection of libbpf dependencies
Type: fix

Change-Id: Ib496e6eb0a76e6268aea09d5f4495f3ecd921ec2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 24b5107edd21b191fac3d6f9f2ae58c6ede59a9e)
2020-11-12 12:33:05 +00:00
Benoît Ganne
dcb9fcfc64 af_xdp: add option to claim all available rx queues
Type: feature

Change-Id: I97176c2c90ea664a68078b3a7b7d44eb237a7f13
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit d4e109138279fcfbfce9d82384f0fa53b8f43ae1)
2020-11-12 12:33:02 +00:00
Benoît Ganne
52bbd86836 ipsec: fix outer table id lookup in ipsec tun script
Type: fix

Change-Id: I195949b610dca1b860baca18a059d39949627961
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 27632cae3dbed6afbaaf12d8da7798d7ecaa2ddb)
2020-11-12 12:32:58 +00:00
Benoît Ganne
019ce71c2d ip: fix doxygen doc for address add/del command
Type: docs

Change-Id: I96d5cdb41bd938f06d2d72f2625bf1b3d2c5b1b4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 7bed48cb79ea13dc34ef263942b4a74030aeb11c)
2020-11-12 11:25:16 +00:00
Benoît Ganne
071328283e svm: fix ASAN annotations for external chunks
Chunks can be allocated from another process. We need to manually
mark them as accessible for ASAN.

Type: fix

Change-Id: Ifbeef3346e9cee2c1231f80cbcf7f9673b5b54be
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit df601ae2d16ed127a9506a7a865484632ee1afe1)
2020-11-09 19:13:25 +01:00
Mohammed Hawari
8cfcbaa726 rdma: various fixes for chained buffers tx
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Change-Id: I428c87e581db335362fef30e274db8947a896416
(cherry picked from commit a210433d534fe0039ddc2a9aa9840895aef0405d)
2020-11-05 08:31:41 +00:00
Mohammed Hawari
7ed6a731ad pci: set PCI memory enable before mapping PCI BAR
This change mitigates software faults issued by some versions of the
linux kernel vfio-pci driver when VF PCI BARs are used without setting
the memory enable bit in the PCI configuration. This problem is
mentionned in https://lkml.org/lkml/2020/6/25/628

Change-Id: Idc177be4a5adb6ee467b4dd8f055f133ff267fe1
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
(cherry picked from commit 70fc36f26855fb4c7a56c5d1563d541b395f8f5d)
2020-10-28 16:27:23 +00:00
Steven Luong
11166453a5 virtio: checksum error reported for ip6 traffic with GSO enable
When GSO is enabled, vhost clears the checksum field prior to transmitting
the packet. Some newer kernel version does not like that and complains
about checksum error. This was seen with ip6 traffic.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I7c6f2a6148f4a30107bfa8b078f5990e64300cf1
(cherry picked from commit ac0f5363881fdce2721287bc5c756282166d9991)
2020-10-23 21:13:59 +00:00
Dave Wallace
ee3ea11496 build: fix typo in dpdk-20.08 patch #0003
Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Id0b3264e723f1df161a606e4dbdcd70c36d448a4
2020-10-23 09:35:12 -04:00
Dave Wallace
312e441a8e build: fix external patch application to not create .orig files
- Generation of patched original files (eg. dpdk-devbind.py.orig)
  causes build breakage of 'make install-ext-deps' on CentOS-8.
  Note: this only occurs on builds using 'make' for dpdk instead
  of 'meson'.  Thus only applies to stable/2009.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I3f1f70781b7a5564cd38e8876644d817e2eb4aad
2020-10-21 19:27:05 -04:00
Dave Wallace
9ef7eae699 build: fix broken debian dependencies on ubuntu-18.04 & debian-9
- Installation vpp-plugin-core from packagecloud.io/master
  & packagecloud.io/2009 breaks due to invalid dependencies
  on newer versions of libmbedtls & libmbedcrypto

Type: fix
Fixes: 641467406

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: If736dabcc4a91a04b46515620dd87662b7b14260
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-10-21 16:29:55 +00:00
Dave Wallace
4b50a90aad build: backport dpdk usertools support python3 only patch
- On Centos-8, 'make install-ext-deps' fails due to the
  bpr-mangle-shebangs script failing the dpdk usertools
  python scripts containing '#!/usr/bin/env python'.
  Backport usertools section of the DPDK patch which
  fixes this issue:
  http://git.dpdk.org/dpdk/commit/?id=3f6f83626cf4967a99382a6518a614a1bf3d2c20

- Also fix README to reflect name change of dpdk master
  branch to 'main'.

- On stable/2009, the dpdk build using make fails due to rpmbuild
  defaulting to using /usr/bin/python (version 2.7) which
  fails to build.  The build on master uses meson which somehow
  resolves this issue.  For this cherry-pick, fix the build by
  fixing the rpm vpp-ext-deps spec to force the use of python3.

Type: fix

Change-Id: I487b1ff2da786a4a3fd8fb0f859436b0e1885f1b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-10-19 23:38:00 +00:00
Chuan Han
d5f8a9b0ad build: Add missing debian dependencies
Otherwise, vpp install will fail.

Type: improvement

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: Ifb4d7b8f6fb7b333b8205ba6b424176f8554cfdc
2020-10-16 08:05:03 -07:00
Dave Wallace
53604e5c83 build: add missing dnf-plugins-core package on centos-8
Type: fix

Change-Id: I1a4d9a7a8089cbf488dcd6f09eec6b4e0d0d72fe
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 858856df162adc095b8ce3c5998c383b0b2f10ff)
2020-10-14 16:34:34 +00:00
Filip Tehlar
4a232f88d0 ikev2: fix leaking pending INIT requests
.. when associated profile is deleted.

Type: fix

Change-Id: Ib05831d79b3b58664ee0a930960513fd465373bf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 6614df53509030f1c3faf52512bcd8a9851dec5c)
2020-10-14 16:08:59 +00:00
Filip Tehlar
94f5335efb ikev2: fix issue when decrypting packet with no keys
Type: fix

Change-Id: I0e615d5089587992012a0f280ee902b2906f21c2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-10-14 15:13:40 +00:00
Chuan Han
93a786b4d7 build: fix build for debian testing
1. add libelf-dev to default deb deps
2. Also use libffi7 instead of libffi6 for debian-testing

Type: fix

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: I9f13955812877422ecb8aac3dd34c5828b9c4607
2020-10-02 10:38:39 -07:00
Andrew Yourtchenko
072def4738 build: fix the version in 'show version' for RPM
The RPM build ends up with "vXX.YY" to vstring,
which is not what we'd expect - so fix it up.

Change-Id: I0af68e69b1e40fc49ade759bb2f0ed9f47614217
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v20.09
2020-09-30 23:58:50 +00:00