tap: fix memory errors with create/delete API 68/20668/2
authorBenoît Ganne <bganne@cisco.com>
Mon, 15 Jul 2019 15:16:49 +0000 (17:16 +0200)
committerDave Barach <openvpp@barachs.net>
Thu, 18 Jul 2019 15:16:37 +0000 (15:16 +0000)
commitc30d87e6139c64eceade54972715b402c625763d
tree4d8d5f88f18c56955a0cb5deaeaf35581d42abdc
parent58b2eb1af562c292feb6d3cdce4656746e61da75
tap: fix memory errors with create/delete API

CLI allocates vectors consumed by tap_create_if(), whereas API pass
null-terminated C-strings allocated on API segment.
Do not try to be too clever here, and just allocate our own private
copies.

Type: fix
Fixes: 8d879e1a6bac47240a232893e914815f781fd4bf
Ticket: VPP-1724

Change-Id: I3ccdb8e0fcd4cb9be414af9f38cf6c33931a1db7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/devices/tap/tap.c