bonding: add checks for sw_if_index in api