From owner-freebsd-ipfw@FreeBSD.ORG Tue Sep 19 04:17:56 2006 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEBAA16A40F; Tue, 19 Sep 2006 04:17:56 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mx18.yandex.ru (smtp2.yandex.ru [213.180.200.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD53B43D5F; Tue, 19 Sep 2006 04:17:55 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from ns.kirov.so-cdu.ru ([81.18.142.225]:11027 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3376058AbWISERv (ORCPT + 1 other); Tue, 19 Sep 2006 08:17:51 +0400 X-Comment: RFC 2476 MSA function at smtp2.yandex.ru logged sender identity as: bu7cher Message-ID: <450F6F6D.6020105@yandex.ru> Date: Tue, 19 Sep 2006 08:17:49 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Roman Bogorodskiy References: <20060918125848.GB93854@novel.fannet.ru> In-Reply-To: <20060918125848.GB93854@novel.fannet.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ipfw@freebsd.org Subject: Re: A bit weird code X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 04:17:56 -0000 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