diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c index 9aad4d959c7a..89bc36375d87 100644 --- a/sbin/ipfw/tables.c +++ b/sbin/ipfw/tables.c @@ -885,6 +885,8 @@ table_do_modify_record(int cmd, ipfw_obj_header *oh, sz += sizeof(*oh); error = do_get3(cmd, &oh->opheader, &sz); + if (error != 0) + error = errno; tent = (ipfw_obj_tentry *)(ctlv + 1); /* Copy result back to provided buffer */ memcpy(tent_base, ctlv + 1, sizeof(*tent) * count);