aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-08-13lisp: fix use-after-freeBenoît Ganne1-8/+8
Type: fix Change-Id: I42c3e3514ba50d40e09ee688d083f3e78fa0713a Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 101fc278c3b7009c42574a25b96c4fb7fcd15e39)
2020-08-13vat: fix static analysis warningAndreas Schultz1-2/+1
replace hand crafted version with existing vector function Type: fix Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: I94834852469ed316c7bdbd48bb7f479648b2c8e5 (cherry picked from commit 63551351b75d1363b57ed1810b0d7065ca5cd600)
2020-08-13dpdk: fix udp-encap for esp in transport modeAlexander Chernavin2-10/+9
Now UDP encapsulation doesn't work in transport mode because: - the encrypt node misses filling of UDP header and it gets sent with all zeros; - the decrypt node misses filling of new IP header and it contains garbage data. With this commit, fill UDP header during encryption and fill IP header during decryption. Change-Id: I87a7bd594f0e312b16d3e5eb19e568b4e3164d36 Type: fix Signed-off-by: Alexander Chernavin <achernavin@netgate.com> (cherry picked from commit 82fc98fa4578dbbfb156effb11dea6a4e2d0b898)
2020-08-13vcl: fix app destroyFlorin Coras3-21/+21
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I21daa87b1a301142270a1bf20680dd9e9395aac9 (cherry picked from commit ce815deb72fd3941b000aecec931131afc9d6c34)
2020-08-13fib: fix use-after-freeBenoît Ganne1-10/+11
Type: fix Change-Id: Ie7081d977dd0d3e7d09bc0d1b4d53863288e443b Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 95eb01fdc65b692065ace6d76870d8cc9f3e2c84)
2020-08-13bier: fix vector size confusing ASanBenoît Ganne1-1/+2
The vector is initialized to 1024 entries which is guaranteed to be enough, but as its size can shrink between calls, make sure ASan is aware of the expected size before using it. Type: fix Change-Id: I4bcc39867a886b3cb463854d2cda0b32155650e9 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 77100efb37f7cb333f9ab55dc206bf1431e3ae50)
2020-08-13igmp: fix igmp proxy group mergeBenoît Ganne6-24/+25
When merging proxy groups in igmp_proxy_device_merge_group(), the call to igmp_proxy_device_merge_src() can end up removing the current proxy group via igmp_group_clear(). When that happens, it must returns NULL so that igmp_proxy_device_merge_config() does not send a IGMPv3 report for a dead proxy group. Make igmp_group_clear() reset the group pointer to NULL to fix this bug and to detect similar bugs more easily. Type: fix Change-Id: I229e55b5bfa71734d7844893f5209a66fa3cc8ae Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit bd7f3422bbe38ba87888b765e94b56bfcbb9602c)
2020-08-13session: detach session from app on cleanupFlorin Coras1-1/+6
Type: fix Avoids unwanted notifications. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifff27fb0d3644194e3bb3f91d7ed1fd02c6730cd (cherry picked from commit 77ea42b31ae12f0aef829097225e353199360f30)
2020-08-13fib: fix accessing empty dpo pool elementsShivaShankarK2-2/+8
Type: fix Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com> Change-Id: Iee88a2101ce42d7f1cdb65df532c349d14829e4c (cherry picked from commit 35acaac1843839f94e9bd40ad45a8d170a155f22)
2020-08-13udp: fix local node no port error counterFlorin Coras1-9/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie0c5a86aedfa38fdcbb835aee7c9e91d59b222d6 (cherry picked from commit bc1a1a7347d689aa7043d4d7f15a7db657230216)
2020-08-13fib: fix adjacency cli command issueShivaShankarK1-3/+1
Type: fix Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com> Change-Id: I193023705003e664c50487fdfaa42b813604a078 (cherry picked from commit ae9c45938bdf6e180f83f02aed31113e60db20a9)
2020-08-13misc: fix error handling in punt_replicateDave Barach2-2/+8
If vlib_buffer_clone (...) fails due to a buffer allocation error, update *n_dispatched with the actual number of clones, not the requested number of clones. Punt_replicate(...) should not set *to_next[0] = bi0. The original buffer is enqueued separately in punt_dispatch_node(...) Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I774ad8f8c1a0633de4cf8ae5530629201c229347 (cherry picked from commit 1adc7e78ad3eb7e800d0ce3ace56f53ab7aebffe)
2020-08-13vat: fix vat strncpy stringop-overflowRay Kinsella1-2/+1
Fix GCC 9.0 barf on vat strncpy. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I5e41225d6ac9673a9d953046720df55e7b69c479 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit b1bb513792fecd735effebbd07d867ea93adc9f6)
2020-08-13vat: fix static analysis warningDave Barach1-2/+3
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia46f865082dcf0cf06af99a7c958c4a5b02193ce (cherry picked from commit 032a5e3da0f4350390d97d6011160fe0d34a8d6e)
2020-08-13misc: strcpy be goneDave Barach8-30/+30
Causes static analysis "vulnerability" warnings Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I272fa69251d70f62178e6dff0423c16f99937af1 (cherry picked from commit 0250090fc0c24214cb1fa969f6e2f585099ee36b)
2020-08-13misc: sprintf be goneDave Barach14-195/+206
Along with related static analysis warnings... Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2c6949c7a2250b8f76a63508c7c210daecfe0f91 (cherry picked from commit 3e07a4a1e843267892dc291a833d93bd70597011)
2020-08-13misc: fix sonarcloud html issueDave Wallace1-1/+1
Type: fix Change-Id: I3691c310fa6336bf2c103c42bccd94c27aab4878 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> (cherry picked from commit 39aa7a5202a6a875bd6f5d341cb07f19ab0bf51e)
2020-08-13dpdk: VM VHOST tests with rxq>1 failingSteven Luong1-0/+1
DPDK recently added a check in the virtio driver to make sure that rxmode->mq_mode == ETH_MQ_RX_NONE. We were passing ETH_MQ_RX_RSS and the device initialization was not accepted. The reason for the change in DPDK was that there is no controls (algorithm, redirection table, hash function). So they thought ETH_MQ_RX_NONE was the best choice for the value of mq_mode. Type: fix Ticket: VPP-1853 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ifa0fc4206cedc56a851f94f6434a2a7500bbd419 (cherry picked from commit b32436aab9626cb8b7bc4099142135c5c9e19beb)
2020-08-13misc: fix static analysis warningsDave Barach2-4/+4
One actual bugfix. Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Icef25167f97a70cc795c0a481174de319ed79ad5 (cherry picked from commit c35f3e835b4078fedabc1ff5013bc4727f533e16)
2020-08-13session: fix fifos displayAloys Augustin1-5/+2
This prevents a crash with quic listeners, and enables the display of udp fifo status. Change-Id: Ib9f48818ee3e51a3fa43ad8ab175e8aa7750df8f Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit 6eef40bce3f5ae2b06ba75d5b4cf32f168a801e4)
2020-08-13udp: validate input data lengthFlorin Coras1-4/+7
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3f34011ca61ded310d0411e7b50548982bd164ac (cherry picked from commit 936197467aac08b7620c9cb0614817b90466968e)
2020-08-13ipsec: use id in ipsec_tunnel_protect_detailsMatthew Smith1-4/+6
Type: fix The data populated into an ipsec_tunnel_protect_details message includes an outbound SA and a list of inbound SAs for a tunnel interface. These are populated with SA indices. The values used by an API client to refer to an SA in other messages is the SA id rather than the index. Use the SA id instead of the index. Change-Id: Ifaad32801092a7f87bd0dcf19de418d36613f8dd Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit 5cee0bca5d0f01d3f26e90dee79780382e843d04)
2020-08-13session: fix coverity warningDave Barach1-1/+1
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib5da600b7a40f775de7dc5b9aaa8d967e49e8632 (cherry picked from commit 4897d77c6d4d5d04eb7e02bda57dc6c7005a609f)
2020-08-13ip: Adding IP tables is no MP safeNeale Ranns1-2/+0
Type: fix it was marked MP safe in the CLI (which it shouldn't be) but it it not marked MP safe on the API. Change-Id: I4bdea498a510a8b406d13d62a899b6d03656f7e8 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 31d6c738c20d3baa619dbbb08af6125fab32bc08)
2020-08-13avf: fix rx queue refill on buffer alloc failureDamjan Marion1-6/+6
If buffer alloc fails, it may happend that rx queue will be stuck as old code only refills if at least one packet is received. Type: fix Change-Id: I388c4f8a9fb2c208bdc222e31b443cbe6b94af82 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit e7f7190381c66cca6c1c3c77b3d43148818a5a4e)
2020-08-13vcl: fix ldp recv return on errorFlorin Coras1-1/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae (cherry picked from commit 2a6642e95dc18d7c56f87b74a70658b8312b8c08)
2020-08-13vcl: fix ldp writev 0 vecsFlorin Coras1-12/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iec5db8dcf3a019b731e15fd79d0208d6eb10943b (cherry picked from commit eda1b8c32f9857bb749835b0189af002b224927d)
2020-08-13avf: proper promisc handlingDamjan Marion2-7/+27
Type: fix Change-Id: Id20a0fe77372602fd211156ccee01c18d829d8df Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit 1839fe165c7ffb834775b8582fe0ee2321ff2ab6)
2020-08-13virtio: vhost gso checksum error when both indirect and mrg_rxbuf are offSteven Luong1-20/+19
Turn on gso, turn off both indirect and mrg_rxbuf caused traffic received and sent with checksum error. The problem is we are not mapping the hdr correctly in the shared memory address. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7ef3bc2755544167b0e624365988111b17399e89 (cherry picked from commit b232d192f2f77114e26cf7f99b57bcd6140872d0)
2020-08-13dpdk: false link down issue with ixgbe NICLijian.Zhang1-0/+66
This issue is observed with X520-2 NICs on FD.io lab Taishan server. After VPP booting up and bringing up the interfaces with command "set interface state <interface> up", it still shows link down status from the command "show hardware-interfaces". However, the hardware link status is actually up. dpdk_process() cannot get the hardware link status correctly via rte_eth_link_get_nowait(). In ixgbe_dev_link_update_share(), if the media type is fiber and the link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to ixgbe_dev_setup_link_alarm_handler() is scheduled trying to set up the link and clear the flag afterwards. If the device is started or stopped before the flag is cleared, the scheduled callback is canceled. This causes the flag to remain set and subsequent calls to ixgbe_dev_link_update_share() return without trying to retrieve the link state because the flag is set. When the callback is canceled by either interface start or stop operation, in ixgbe_dev_cancel_link_thread(), after cancelling the callback/thread, unset the flag on the device to avoid this condition. Type: fix Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com> Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com> Change-Id: I04de377dc048307a78a5b7109ebdfaf376d5e029 (cherry picked from commit 1690dcb49527934e83748e7b6db8501b33c3758a)
2020-08-13vlib: complain if workers are configured twiceVladimir Isaev1-1/+10
Right now following configuration leads to crash: cpu { corelist-workers 2 workers 2 } because threads count will be set to 2, but we have only one core in coremask. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: Ia93b892733971e7c8ddfceaaec5f4eb8bf9063ac (cherry picked from commit 18a4a371646bccfd299e6a509e801a524aeb4c92)
2020-08-13vlib: fix error when creating avf interface on SMP systemJieqiang Wang1-1/+13
On SMP architecture, '/sys/bus/pci/devices/<devices id>/numa_node' file will return -1 as a valid value if it does not have any NUMA node information. Using -1 as a valid node id to access data structures will cause memory issue. Fix the error by setting the value of numa_node to 0 if '/sys/bus/pci/devices/ <devices id>/numa_node' returns -1 and it is a SMP system. Type: fix Change-Id: Ib60e79c3656fe5b17e08fd9011122683e8b08b6f Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> (cherry picked from commit 76c6159d83c2dfe29f84dc4b05d399cdbbdf2878)
2020-08-13ip: provide extern declaration for ip punt nodesJawahar Santosh Gundapaneni2-0/+2
Type: fix Signed-off-by: Jawahar Santosh Gundapaneni <jgundapa@cisco.com> Change-Id: Ife0f7749a72cc834a3d811f8cf6b5a0840157014 (cherry picked from commit 62ad2aaff3810f4ec0f010700091c2f59fbfe466)
2020-08-13tcp: count dupacks with no sacksFlorin Coras2-1/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia2e29b4776c0f8df666da39a14c5ef2fa1693c21 (cherry picked from commit 7fd59cc79c9fb0cccd0cb5c0b4579d0f0a004f6b)
2020-08-13ethernet: Copy only 6 bytes of mac address into a u64Jon Loeliger1-3/+3
Rather than leaving 2 bytes of junk in the upper word of a mac address represented as a u64, zero them out. That way later compairsons stand a chance of matching when deleting a bridge's arp termination entries. The volatile qualifier shouldn't be needed here, but without it the compiler removes the clib_memcpy() at -O2. Bad compiler. No biscuit. Type: fix commit: faf22cb303b65e2a6bf8dad959d7f5ee6d031c4f Change-Id: Iebcf35fdd421293dccbcaefadef767f7e139438e Signed-off-by: Jon Loeliger <jdl@netgate.com> (cherry picked from commit 6a32ce326495bfe48ebef74dfbb8a9c1cf37a530)
2020-08-13pg: update packet generator test scriptsShivaShankarK23-46/+46
update packet generator test scripts to reflect latest code changes Type: fix Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com> Change-Id: I048a5e8b9b0506dcb0b664e5549d13f51b2e2ea6 (cherry picked from commit b0f956c255de7aa61fead96b7b94bcf937d92c05)
2020-08-13lb: fix coverity warningDave Barach1-1/+1
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e (cherry picked from commit a53068905eb3f005a5a6d324c37f51056fb49b3e)
2020-08-13udp: fix UDP socket byte order in lookupAndreas Schultz1-1/+2
The port registry uses host byte order for while the session API uses network order. In a single place the conversion was missing. Type: fix Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: Ic8cfe2cb4e0711b3e0614060ff6b4f2fe4ed4391 (cherry picked from commit 49a11cff8e7892858d946d3f93ae19502236c358)
2020-08-13misc: Fix vpp-selinux-policy dependency on CentOS 8Renato Botelho do Couto1-1/+6
policycoreutils-python is now called python3-policycoreutils on CentOS 8. Type: fix Signed-off-by: Renato Botelho do Couto <renato@netgate.com> Change-Id: I46264c66a2a719d546e0926f3bd716e986461963 (cherry picked from commit 1d94ab5f1b4557c9e017af7e9da0f821cae1fa72)
2020-08-13fib: path flag FIB_API_PATH_TYPE_INTERFACE_RX not copied to clientIJsbrand Wijnands1-0/+4
This path flag FIB_API_PATH_TYPE_INTERFACE_RX is not copied to the client bin_api. Type: fix Change-Id: Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Change-Id: I612044d2f564c852f83fceb63ce750a6330e1365 (cherry picked from commit 79437c8dbc707e6f60e7a2425fac15c4153f71b3)
2020-08-13vppapigen: crc is a negative value for some messages when using python 2.7Mark Nelson1-2/+2
Type: fix Signed-off-by: Mark Nelson <manelso2@cisco.com> Change-Id: I4f121e49d3c05c21eed3fed2469bd88fc84e2271 (cherry picked from commit ea2abbaeaf34a4652e970fd1e2f60c0d377ebde4)
2020-08-13ebuild: fix the distclean targetDave Barach1-16/+13
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I32142962cb70ea0d92cda1b0ffaac42b7de15974 (cherry picked from commit 952ec0e0a68ccf5a4c3c00894bb26a25d80910a3)
2020-08-13vppapigen: list imports in JSONOndrej Fabry1-0/+7
Type: fix Change-Id: If50477f2487d8c13f91c119a1492370e6e937904 Signed-off-by: Ondrej Fabry <ofabry@cisco.com> (cherry picked from commit eec5d48040695e45c4880adb59bb18ebacd667c1)
2020-08-13lb: Fix generating illegal key in per-port vipYasuhiro Nakamura1-0/+2
VIP prefix index becomes always 0 when adding a VIP which is already registered different port, causing LB config crash. This change assigns the same VIP prefix index to the same VIP. Ticket: https://jira.fd.io/browse/VPP-1834 Type: fix Signed-off-by: Yasuhiro Nakamura <yanakamu@yahoo-corp.jp> Change-Id: Ib63b3e58db9bd85714d68cd1292aadd0c8580da8 (cherry picked from commit 551775eaaa9c162c73e15690e4d7580935e9a70a)
2020-08-13vat: add ip api types parser definitionsJakub Grajciar5-3/+52
build vat with src/vnet/ip/ip_types_api.c Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Iab0f18bf7a89cf9512beab0629bc3a349edec383 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> (cherry picked from commit 23a386b71b287bc95000a8980856c5dbe7cdaf5a)
2020-08-13map: handle IPv6 extension headers for TCP/UDPVladimir Isaev1-2/+2
Without this patch offset for TCP/UDP headers was not calculated correctly if there is one or more IPv6 extension headers. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: I04d6f5e42f8f072987192d6236085afbd74a4420 (cherry picked from commit 7d4cd0cf6f1a94953ef97ab885752424dea6948c)
2020-08-13unittest: Skip string test case for sizeof (src) > sizeof (dst)Steven Luong2-4/+19
coverity complains that the subject test may cause dst buffer overrun problem and it is right. The problem is when __builtin_constant_p (n) returns true, memcpy_s_inline skips all the errors checking and does the copy blindly. Please see the code in memcpy_s_inline. The fix is to skip the subject test when the aformentioned builtin function returns true. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I50de91cc0c853a134b3bcf3b0cd8d45d7668b092 (cherry picked from commit 2da39718f560478678caacccd198ee4c0c9673c3)
2020-08-12crypto-openssl: fix coverity warningsFilip Tehlar1-5/+5
Type: fix Change-Id: Ia42ff39a0a33f89901b8333a9e6ca82ca9805cc6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com> (cherry picked from commit 41e831f5588fe5ebfd879f4e570e85e12770b360)
2020-08-12tcp: remove useless predictionSimon Zhang1-3/+1
Type: fix Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: Ie2dc2653baec92347eb2cbcd197a2e5ec6a80c79 (cherry picked from commit 487507f40f4e443ff1e683641206db80875f3477)
2020-08-12gbp: Coverity warnings for unitialized variablesNeale Ranns2-0/+3
Type: fix Change-Id: If74ad528e68f45b00719295388e0e1399452ef93 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit e9a630a5248ee6e234c1bf1fdb2c29fc6239f60d)