vl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface 07/8207/1
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 22 Aug 2017 11:10:01 +0000 (13:10 +0200)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Fri, 25 Aug 2017 07:33:51 +0000 (07:33 +0000)
commit81d1e27eed522e0fa4c4f670042bdc8159f0fc9b
treed2302b4cc1e95b3c448b09a6080f8a77201e4a09
parent57d963f88b2c99e698e2b29f72e190f47f41b1ad
vl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface

The handler was calling the routines with sw_if_index instead of hw_if_index,
fix that by an extra call to vnet_get_sw_interface, and check that the interface
type is VNET_SW_INTERFACE_TYPE_HARDWARE before proceeding.

Change-Id: I4a6f65f44e250ecdb2b72d2693c9d7db5a52b966
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 778df28c2a1520f58c293700c578bdd73e61cecf)
src/vnet/interface_api.c