vl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface 56/8156/3
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 22 Aug 2017 11:10:01 +0000 (13:10 +0200)
committerDave Wallace <dwallacelf@gmail.com>
Thu, 24 Aug 2017 21:32:18 +0000 (21:32 +0000)
commit778df28c2a1520f58c293700c578bdd73e61cecf
treeac94442a99a68605d24eef6802a17e242b6e3d03
parentdff9314f6f5c88b4320ec5de33fb40ac91632a0d
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>
src/vnet/interface_api.c