misc: fix error handling in punt_replicate 33/26433/2
authorDave Barach <dave@barachs.net>
Wed, 8 Apr 2020 18:31:45 +0000 (14:31 -0400)
committerNeale Ranns <nranns@cisco.com>
Thu, 9 Apr 2020 06:50:11 +0000 (06:50 +0000)
commit1adc7e78ad3eb7e800d0ce3ace56f53ab7aebffe
treed605386ed47fe48328754e3de362a860b381c79b
parente759bb543c38a682dc31492a3a0a58669a811538
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
src/vlib/punt_node.c
src/vnet/ip/punt_node.c