misc: fix error handling in punt_replicate 82/28382/1
authorDave Barach <dave@barachs.net>
Wed, 8 Apr 2020 18:31:45 +0000 (14:31 -0400)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 13 Aug 2020 17:20:47 +0000 (17:20 +0000)
commit83be6cb7908533ae8230d39909768d22a322cc3a
tree974b57f35c20a66c87d2f61dc00488047bbf3676
parent22fb6e6ef8fc81227b3e40cb074f745a3e7361dd
misc: fix error handling in punt_replicate

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)
src/vlib/punt_node.c
src/vnet/ip/punt_node.c