7676 Commits

Author SHA1 Message Date
Paul Vinciguerra
99e0ee56eb vpp: fix .short_help for "ip virtual"
Type: fix

"# <feature-name>: <subject>

Change-Id: I8b6b6b8c70faec7cd95e1842259e907fb9587017
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 0812aea046209dc990ec704258570f46d3fa74c8)
2020-08-12 11:16:27 +00:00
Paul Vinciguerra
e144c1b9d2 vxlan geneve gtpu: fix short help
Type: fix

Change-Id: Id53eb6ed15f270d747b9831a7b585cbafe515dd2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5fb2278cb8badbbfe727acbdcaeda008a7fd2833)
2020-08-12 11:16:19 +00:00
Paul Vinciguerra
ffd24e5243 ip: cleanup punt socket cli help
Make the help string consistent with the cli parser.

Type: fix

Change-Id: I7140bd589c2a94dbf5af5cc633cb495457a6af22
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 32c4d38f7ac6fe22abb0b4859f6075bb9b661773)
2020-08-12 07:43:14 +00:00
Paul Vinciguerra
43deb075fb feature: add descriptive cli command output for 'set interface feature'
DBGvpp# set interface feature local0 arp-foo arc bad-arc
  set interface feature: Unknown arc name (bad-arc)...

  DBGvpp# set interface feature local0 arp-foo arc arp
  set interface feature: Feature (arp-foo) not registered to arc (arp)...
  See 'show features verbose' for valid feature/arc combinations.

  DBGvpp# set interface feature local0 arp-disabled arc arp

Type: fix

Change-Id: I036bb2a75dd2d40f6901e4fde3eb14925238e19b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit a4e2e7cc95250220e0d892eb11dcc0adc9fd7e22)
2020-08-12 07:43:14 +00:00
Paul Vinciguerra
67cb0f82a1 feature: add [verbose] to show features help
Type: fix

Change-Id: Idf694477c18852e5541c28a493a56b302122e46c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit baa171041bc950f192c147f7b79a8add2299b74a)
2020-08-12 07:43:14 +00:00
GordonNoonan
8ab656321e vlib: fix startup-config-process stack overflow
Type: fix

Startup config setting an i40e/ice interface
up in Debug VPP consumes more than the currently
available stack space.

Signed-off-by: GordonNoonan <gordon.noonan@intel.com>
Change-Id: I98b52c5596799017b97f802a8661b76cd1bb3245
(cherry picked from commit b2dbb36fc265b8996fc7fa310dda447d5b0479cb)
2020-08-12 07:43:14 +00:00
Vratko Polak
a750b7f71f vlib: fix an issue with show pci
The fix has been received over e-mail from Lijian Zhang.
https://lists.fd.io/g/vpp-dev/message/14808

Type: fix
Ticket: VPP-1805

Change-Id: I73e5fe7dcbe2b0b1c639d844f29183eab3b6dd66
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit dea0b23fa73fe3d53b8f3b004f7b8a2a8456d7f7)
2020-08-12 07:43:14 +00:00
Bernhard M. Wiedemann
55ae848ce4 build: Allow to override build date with SOURCE_DATE_EPOCH
and make host and user overridable
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Also switch to UTC to be independent of timezone.
Also use ISO 8601 date format to be easier to parse.
This is similar to c9f40227836b827b71a6cbc4744d4b7151b2fcef
and df82ec8fe7d91467c8b479bba74c761c0a6ffc59
which was lost in the move away from automake.

Note: This date call is designed to work with different flavors
of date (GNU, BSD and others).
If only GNU (Linux) support is needed, the patch can be simplified.

This PR was done while working on reproducible builds for openSUSE.

Type: fix

Change-Id: If4cab12320e6b5fcb1f2842fac5d745b33b01ed7
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
(cherry picked from commit 3d14f036199d9b3098268821424b4e6f5e8f46dc)
2020-08-12 07:43:14 +00:00
Benoît Ganne
a699926a0d vlib: fix vector-as-C-string overflow
Type: fix

Change-Id: If0419ff1a82d45e5b3326973008e1b9feb290c5a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 62d9fda8e474f87459c6e24d13b09f7bfec146f3)
2020-08-12 07:43:14 +00:00
Benoît Ganne
d8e41e7810 classify: forbid invalid match config
Forbid too long match to be configured.

Type: fix

Change-Id: Icfced0f86821d5febd6a3c81e1315bd9737498c0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 71a70d73f34f7c057dd95dbca39fb8e602087a75)
2020-08-12 07:43:14 +00:00
Benoît Ganne
280079fb99 vppinfra: fix cpu flag string overflow
Type: fix

Change-Id: Idb1fff8a172034044bb33d5b271a84d1fd672ef5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a7cb357491bc8adeac23a329685e8ea9aa2d2f33)
2020-08-12 07:43:14 +00:00
Benoît Ganne
6051aa4924 l2: fix l2input_feat_names overflow
Type: fix

Change-Id: I59549b3aab5a0ccfe7db02757f78528e028121a5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 70ef0faea9f706004c068fb843797a7cb08a9e68)
2020-08-12 07:43:14 +00:00
Neale Ranns
f7b581260f ipsec: Init salt value in SA creation CLI (so it's not random)
Type: fix

Change-Id: Idf4d0b59a1eb2c739a67a4786470884050f81561
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 8dc75c0cc3ac0db13778a0a32f9aa81597b80556)
2020-08-12 07:43:14 +00:00
Florin Coras
339cad4aaf api: fix sock reg passing on read event
Type: fix

Change-Id: I383242e04a114b69fe247d912842be3560e96c10
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5224b5cbd51ed48d1d2ce2a412998d8a944c480b)
2020-08-12 07:43:14 +00:00
Benoît Ganne
299f9caae6 ipsec: make sure pad_bytes does not exceed pad data size
This helps GCC understand the memcpy will not overflow pad_data. GCC-6
(default on Debian 9) in particular got confused.

Type: fix

Change-Id: I176eb01531b9d5c7ebec40f015e510b2d56e77c4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4505f0154eaba59c432c869b65e2dc493837032a)
2020-08-12 07:43:14 +00:00
johny
b04bdd12e6 ip: coverity fix
Delete Null-checking "p0" in function ip6_tcp_udp_icmp_bad_length,
because it's not necessary.

Type: fix

Signed-off-by: johny <jan.cavojsky@pantheon.tech>
Change-Id: I2bf43a60c1c1d76e42581df27f2285c9e9563093
(cherry picked from commit a633a4318bea2f9edcb80d9685b0f811cac679ea)
2020-08-12 07:43:14 +00:00
Florin Coras
3d3c4f0491 api: fix free socket process args
Type: fix

Change-Id: I910be067de6ed65790d25cc95a3d8b5b66680567
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit b0384230d95d9de5e5fec0a311b8644c99f85c31)
2020-08-12 07:43:14 +00:00
wanghanlin
889ea0f54c vcl: RX event may lost when accept session repeatedly
Type: fix

Some applications may call accept repeatedly to process all connect
request until get EAGIAIN error. Subsequent call may get RX event of
previous accepted session, then should process it rather than just
discard it.

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Ice53442de66289a62591b79a9cc31e883e894c23
(cherry picked from commit 96453fd2417ebd1d69354a7fb692976129cea80e)
2020-08-12 07:43:14 +00:00
Florin Coras
ec12ffe1bd session: close for reset replies independent of state
Type: fix

Change-Id: I8b8875f1dc9203dfbb443ac43df8250cbb0b1edc
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit f1910326d537ad7692d4a9b807ebbef93106acea)
2020-08-12 07:43:14 +00:00
Florin Coras
9e51b52bb9 tcp: fix tail rescue with sacks
Type: fix

Change-Id: Iad73f47cef3d29c4b0b7d1f58f2f2b14ba4b1d38
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 3eba7f1575a17b77924bf5be67b03b0227d04b78)
2020-08-12 07:43:14 +00:00
johny
25b58c6d21 ip: fix cancel termination after receive malformed ip6 packet
This fix is for cancel termination of vpp after receive malformed
packet type of ip6.To avoid termination of vpp are checked if are
missing data in packet. This occours, when payload length in ip6
header packet is more than real count of data in packet. When
this error occours, packet is ignore.

Type: fix
Ticket: VPP-1693, VPP-1694

Change-Id: I9d9ecea7b75c8702cb31aa8051c8d4d7ce19659d
Signed-off-by: johny <jan.cavojsky@pantheon.tech>
(cherry picked from commit 17478e4eb81d384f171ca27c9110a051cd434f16)
2020-08-12 07:43:14 +00:00
Klement Sekera
cba508a212 tests: fix wrong checksum error message
This change fixes the error message, which would previously report
mismatch on IPv6 layer instead of TCP layer.

Type: fix

Change-Id: Ie78779685362a420d155f928b3cdb341bc3fb8bc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 66cea092c7a584bb7b82000fbfad349e6f0af7e1)
2020-08-12 07:43:14 +00:00
Yu Ping
9e357046a3 vcl: resolve VCL part session cleanup issue
In Nginx performance test, we notice that there are so many session kept
open with the state of TRANSPORT_DELETE, and it is root caused that
vppcom fails to return close state.

Type: fix

Change-Id: Ia30f959e0e5adb5b8bcfa13fb1dd7b2cb410a31b
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit b2955355cc9a654447d8647e33def67cd27892f6)
2020-08-12 07:43:14 +00:00
Yu Ping
e09a07826e tls: change SSL_has_pending to avoid BIO check error
Type: fix

Change-Id: I454aff1b187b75a1328c90e30b9b487377ae5f68
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit ce9bdfe5fcfa6e2acd670ea0063ce5e0fde15096)
2020-08-12 07:43:14 +00:00
Jon Loeliger
be4511d318 map: Fix a coverity MAP dead-code issue.
Type: fix

Change-Id: I5467bbe3b25b1ea3fb44157abe6e7bfb3f191e77
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 3aae3dc7acddbe2f46de785b50c3358b7d3e0acc)
2020-08-12 07:43:14 +00:00
Jon Loeliger
897c941c8d map: Avoid null dereference in 'map show' and 'map del'
If a map domain is created without a tag name, inspecting
the map data will segfault looking for an unset name in
the so-called "domain extras" vector.

Enhance "show map domain" to show all map domains.

Type: fix
Change-Id: Ic55662b84eec58221816da270b2ef9e89c3a31c3
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 4a6d093e7ef72b06b35ffee911d35033dfde0171)
2020-08-12 07:43:14 +00:00
Florin Coras
2b9bf4f4a7 ip: init l3_hdr_offset when pushing an ip4 header
Type: fix

Change-Id: I87503b9a981724b1f3ff1c45a4a5f7a43024ca76
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 757de9873bbaf2d21d107da42c6bbeb2804c7fcc)
2020-08-12 07:43:14 +00:00
Benoît Ganne
c7e400f8af tests: display stdout and stderr when output caching is disabled
Type: fix

Change-Id: I4286ba58bb15dd67c1199f76166bedf3b4e0344c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 1a7ed5e3e62dfe77832022a46ee32d744a347ac5)
2020-08-12 07:43:14 +00:00
Chenmin Sun
cb3edd53e8 flow: fix several crash issues
Type: fix

This patch fixes crash issues(marked in brackets) in the below test cases

test flow enable index 0 1/1 -> [crash]
test flow disable index 0 1/1 -> [crash]

test flow add src-ip 192.168.8.8 proto udp redirect-to-queue 8
test flow enable index 0 1/1
test flow disable index 0 1/1 - [crash]

test flow add src-ip 192.168.8.8 proto udp redirect-to-queue 8
test flow enable index 0 1/1
test flow enable index 0 1/2
test flow del index 0 -> [crash]

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I84bc6faa3d93a2cab4c82e8a876a8b1067257b62
(cherry picked from commit be2ad0b4743ed8a3875a5b6039c10c66eb07614c)
2020-08-12 07:43:03 +00:00
Jon Loeliger
cd3a7c9646 map: Fix inverted 'map security check enable' CLI flag.
Type: fix
Fixes: 5a2e278a09726be627b8310e03f0522d60aafedf

Change-Id: Ibdc2f0be44e382bfa4a8f3e16be8d6239d7a0ec1
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit acaa04a22dd8bade2eca944ddd8517961433a34f)
2020-08-12 01:23:50 +00:00
Neale Ranns
8658b077ae fib: Another realloc burn
Type: fix

harmless this time since it only affects the debug statement, but
it still crashes an ASAN image.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ie02e7fe3014b98b9f8c83447f59017a380ab3948
(cherry picked from commit 981a690b7d25c96ea56f95ece693377f95b93fc1)
2020-08-12 01:22:20 +00:00
Florin Coras
29cd29616d tcp: invalidate expired timer handles before dispatching
Type: fix

Change-Id: Icc8cd05cb9c1844a9f8b0399797ad554f4ccf1a1
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit b72a0ff73514ec7ea79ed3fad49b77d56b248642)
2020-08-12 01:22:20 +00:00
Paul Vinciguerra
ec1e751445 vppapigen: fix typo on f64 endian_string
Type: fix

Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Change-Id: Id47e3f2c348f07c84d9c2499122fa25d6c74fb13
(cherry picked from commit 1c200dc492c02b1bf827e627f5a190b911fb34ec)
2020-08-12 01:22:20 +00:00
Paul Vinciguerra
51b95951ba papi: add missing base types to serializer
File "/vpp/src/vpp-api/python/vpp_papi/vpp_serializer.py", line 512, in __init__
    'Unknown message type {}'.format(f_type))
  vpp_papi.vpp_serializer.VPPSerializerValueError: Unknown message type i16

Type: fix

Change-Id: Ibf73dc8df90153db586afe614e47be49739bac2f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit ba2c7fad1d1448b40ea78f36e833821e9ab84687)
2020-08-12 01:22:20 +00:00
Andrew Yourtchenko
cf758ecb71 vppinfra: fix coverity issue 205691 in pmalloc
set the address to MMAP_FAILED if mmap has failed,
so that we do not attempt to free it in the error
handling path.

Change-Id: I6e6b51a365fb68086dc20aa40a676a36af59a3ba
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 9ce35233658d6c19a4458ec7e728b6ee75fd3ace)
2020-08-12 01:22:20 +00:00
Filip Varga
a8f870ac34 nat: respect arc features (multi worker)
Type: fix
Ticket: VPP-1747

Change-Id: If282aae3e584d7017c200f897b99c8a37eb1b2e5
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 9a6dc8a9376e7270331255861b3ead1045b40c6d)
2020-08-12 01:22:20 +00:00
Jon Loeliger
c2d00e343b ip6: Fix improper MCAST adj test in IPv6 router solicitation
Type: fix
Fixes: cb9cadad578297ffd78fa8a33670bdf1ab669e7e

Change-Id: Id6de9780da41db5d762fe042f533cfaf21ed7b73
Reported-by: Rajith PR <rajith@rtbrick.com>
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit a90b26c1ee5bc4410c2753b6683a2e50e275daf6)
2020-08-12 00:22:25 +00:00
Jon Loeliger
fab234754c build: Separate ip and ip6 maintainers
Boldly assign IPv6 to Neale and to me.
Ole said so.  Really!

Change-Id: Iaa30a57230558dcf3ee016a94479cac95bb2d50d
Type: make
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit a6460e46f379315e872819af139ae2c87e8e06f3)
2020-08-11 23:27:20 +00:00
Klement Sekera
894447b151 bfd: add missing cast
Add missing cast to time conversion function to to deal with arbitrary
clocks-per-second values.

Type: fix

Change-Id: I5075a823e7a95c972c513ac765252337d5f59fbf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 27d12d30cdf5af37fad0e14db0877ca716af2115)
2020-08-07 21:45:43 +00:00
Alexander Chernavin
fde70884d4 bfd: allow IPv6 link-local address as local address
Type: fix

Change-Id: Ia3dacd2628591f7ba9710e8e4d68df97ae21935c
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 845f51ffe2a2176dd3187e1eb96c00caee98980a)
2020-08-07 21:45:43 +00:00
Dave Barach
47214ee1e0 dhcp: fix dhcpv6 client and dhcpv6 prefix delegation
Keep trying even if the interface in question is not "admin-up,
link-up." In real life, it's normal for link autonegotiation to take a
good fraction of a second. The driver layer takes care of packets sent
to an interface which can't transmit at the moment.

Renew address leases at the preferred renewal time, not at the
expiration time.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I68ec1c52cc1f4a8aa256185820748b845e92f7c1
(cherry picked from commit 20b962d3e494513ab28854936cc8bbc32891686b)
2020-08-07 21:45:43 +00:00
Nathan Skrzypczak
201fa41eb5 session: fix session_main_get_worker_if_valid
Type: fix

Change-Id: Ie024792015f3c9c52102c9be03da63c79f3456af
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 901467ed75fa76e8fe4792459e3649d4aef4ddc7)
2020-08-07 21:45:43 +00:00
Florin Coras
abfdb9e23b session: fix transport proto unformat
Type: fix

Change-Id: I38a5cbd53b278c21142bac4ee1bbe5dc8bcaaac9
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 3bbbf0dbd367fd8611f9f390a2c6e31a89ce08a9)
2020-08-07 21:45:43 +00:00
Nathan Skrzypczak
4b5723a43e session: Fix out of order mq
Type: fix

Change-Id: I522db62db50fc0fa46a6dd7cddd32e2f09b5e5a6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 989bc47d68187dd5db608d2b32abbbbc392b03ca)
2020-08-07 21:45:43 +00:00
Nathan Skrzypczak
59502edc4f session: session enable in multiworker
Having session enable in config file wasn't
working for multiple workers

Type: fix

Change-Id: Ib29ba540a6e1d714e7e470f4c7518e3d266fe7ca
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 31bd035621bdc57deb757613b534bd6c2b032814)
2020-08-07 21:45:43 +00:00
Nathan Skrzypczak
215c55ad6d session: fix app attach on error
Type: fix

Change-Id: I57b3c76515544ba3655690b37e0dacb47734ba6d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 9d3e1b433f394781a55a4c7c39b695d08dd2563f)
2020-08-07 21:45:43 +00:00
Benoît Ganne
2c4ba41bea dhcp: fix proxy dhcpv6 size check
Type: fix

Change-Id: Ibbb25bc530fdeaa3083c9b833a286a5d40e93c1e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 60ad1a59a39872d0eff8ed0961fd81c5854c968b)
2020-08-07 21:45:43 +00:00
Klement Sekera
818b5bcdf1 ip: fix tracing of packet flags
This fixes incorrect tracing of flags such as MORE_FRAGMENTS.

Type: fix

Change-Id: Ia5698418a7cbb45c18bc9c95f560cea020e63c39
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit ea5cd12d26047c36be5969c2c88147d26f788103)
2020-08-07 21:45:43 +00:00
Ole Troan
3584f0936c papi: fix default handling
The BaseTypers object were reused, so a default for anyother mesage
would be inherited in new messages.

Type: fix
Fixes: 85465588b18fef9c4712f864f512e00741e2d4f2
Change-Id: Ie1efb85a76b088653eb9ea4b88540c98b6b0aad0
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 40dc4b35e3d946efbc5c2b8b0af5e52d67b7fe6c)
2020-08-07 21:45:43 +00:00
Nathan Skrzypczak
48ec77e84e quic: Hotfix crypto context on migrate
Type: fix

quicly_connections have internal references to crypto
contexts which need to be updated when we switch thread
as the supporting pools are thread-based.
This under the assumption that the new contexts will be
exactly identical

Change-Id: I38083e59657ff068e347d9e7b47abe91a1167b6c
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit d9942bcc61d83cee390fc2c6a428e562ec9750f0)
2020-08-07 21:45:43 +00:00