summaryrefslogtreecommitdiff
path: root/examples/ipv4_multicast
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ipv4_multicast')
-rw-r--r--examples/ipv4_multicast/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 7389bee..464b546 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -739,7 +739,12 @@ main(int argc, char **argv)
"Cannot adjust number of descriptors: err=%d, port=%d\n",
ret, portid);
- rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+ ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE,
+ "Cannot get MAC address: err=%d, port=%d\n",
+ ret, portid);
+
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");