diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index 1923efd..d24280a 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -2131,11 +2131,11 @@ badviacombo: rule.fw_loghighest = rule.fw_logamount; } done: + i = sizeof(rule); + if (getsockopt(s, IPPROTO_IP, IP_FW_ADD, &rule, &i) == -1) + err(EX_UNAVAILABLE, "getsockopt(%s)", "IP_FW_ADD"); if (!do_quiet) show_ipfw(&rule, 10, 10); - i = setsockopt(s, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule); - if (i) - err(EX_UNAVAILABLE, "setsockopt(%s)", "IP_FW_ADD"); } static void |