A bit weird code

Andrey V. Elsukov bu7cher at yandex.ru
Mon Sep 18 21:17:56 PDT 2006


Roman Bogorodskiy wrote:
> I was reading ipfw sources and spotted such line (sbin/ipfw/ipfw2.c,
> line 4871):
> 
> err(EX_UNAVAILABLE, "getsockopt(%s)", "IP_FW_ADD");
> 
> And it's there since 1.1 revision of this file. I wonder it has some
> sacred meaning or just a typo.

I don't see this code at this line :)
If you mean this code:
     if (do_cmd(IP_FW_ADD, rule, (uintptr_t)&i) == -1)
         err(EX_UNAVAILABLE, "getsockopt(%s)", "IP_FW_ADD");

I think this is "copy&paste" bug :)

-- 
WBR, Andrey V. Elsukov


More information about the freebsd-ipfw mailing list