summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/af_packet/cli.c')
-rw-r--r--src/vnet/devices/af_packet/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c
index 29c0e060a91..faa07287418 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_command_fn (vlib_main_t * vm,
}
}
- 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);