summaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding/bond_api.c
diff options
context:
space:
mode:
authorAlexander Chernavin <achernavin@netgate.com>2018-12-13 09:08:09 -0500
committerDamjan Marion <dmarion@me.com>2019-01-13 13:36:22 +0000
commitad9d528314a049971b1fb9a42562b00e07cf93f4 (patch)
tree31173f45bc3558c2ad3df62ad84b8ba6b4705788 /src/vnet/bonding/bond_api.c
parente589b38f98e9d8f88a3bae56549ea49d9d802989 (diff)
bonding: support custom interface IDs
Change-Id: I78fe58144fa3ba2e1c7135897a13a2541f235c91 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Diffstat (limited to 'src/vnet/bonding/bond_api.c')
-rw-r--r--src/vnet/bonding/bond_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/bonding/bond_api.c b/src/vnet/bonding/bond_api.c
index 691697cf4fe..50bae5d528d 100644
--- a/src/vnet/bonding/bond_api.c
+++ b/src/vnet/bonding/bond_api.c
@@ -106,6 +106,8 @@ vl_api_bond_create_t_handler (vl_api_bond_create_t * mp)
clib_memset (ap, 0, sizeof (*ap));
+ ap->id = ntohl (mp->id);
+
if (mp->use_custom_mac)
{
clib_memcpy (ap->hw_addr, mp->mac_address, 6);
@@ -197,6 +199,7 @@ bond_send_sw_interface_details (vpe_api_main_t * am,
clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_BOND_DETAILS);
mp->sw_if_index = htonl (bond_if->sw_if_index);
+ mp->id = htonl (bond_if->id);
clib_memcpy (mp->interface_name, bond_if->interface_name,
MIN (ARRAY_LEN (mp->interface_name) - 1,
strlen ((const char *) bond_if->interface_name)));