vnet: af_packet_set_l4_cksum_offload device class check
Change-Id: Ie07b71977c46d2f1e030799a08cc5af0fdc397aa
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c
index 29c0e06..faa0728 100644
--- a/src/vnet/devices/af_packet/cli.c
+++ b/src/vnet/devices/af_packet/cli.c
@@ -225,7 +225,8 @@
}
}
- af_packet_set_l4_cksum_offload (vm, sw_if_index, set);
+ if (af_packet_set_l4_cksum_offload (vm, sw_if_index, set) < 0)
+ error = clib_error_return (0, "not an af_packet interface");
done:
unformat_free (line_input);