If there are no ports available to the guest cli application, it will
exit when setting up the default policy because it fails to set the mac
address. This should not be the case, as this example can be used for
many other use cases that do not need ports.
If ports not found, simply set nb_mac_to_monitor in the policy to zero
and continue.
Fixes:
70febdcfd60f ("examples: check status of getting MAC address")
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
ret = set_policy_mac(0, 0);
if (ret != 0)
- return ret;
-
- pkt->nb_mac_to_monitor = 1;
+ pkt->nb_mac_to_monitor = 0;
+ else
+ pkt->nb_mac_to_monitor = 1;
pkt->t_boost_status.tbEnabled = false;