mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-05 14:09:48 +01:00
ipfw: correctly report table manipulation errors
Let ipfw(8) report the actual error instead of the error that may have come from calling printf(). Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1221
This commit is contained in:
parent
12be6f12e8
commit
09025a7147
@ -1037,6 +1037,9 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add,
|
||||
}
|
||||
}
|
||||
|
||||
/* Get real OS error */
|
||||
error = errno;
|
||||
|
||||
/* Report results back */
|
||||
ptent = tent_buf;
|
||||
for (i = 0; i < count; ptent++, i++) {
|
||||
@ -1089,8 +1092,6 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add,
|
||||
|
||||
if (error == 0)
|
||||
return;
|
||||
/* Get real OS error */
|
||||
error = errno;
|
||||
|
||||
/* Try to provide more human-readable error */
|
||||
switch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user