From owner-freebsd-net@FreeBSD.ORG Mon Jan 25 22:33:10 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C227106566B; Mon, 25 Jan 2010 22:33:10 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 4D2738FC0A; Mon, 25 Jan 2010 22:33:09 +0000 (UTC) Received: by fxm27 with SMTP id 27so1352594fxm.3 for ; Mon, 25 Jan 2010 14:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=Ndv8+7afie+PjwbMx3xlS7PZXExjtujKYE6YROcyID8=; b=gcRlPPMpMNKv+hrtnw6aNue9DVNMRNpJlgf0vRKEHKteX2EXCVEY+QKcYfwRvmqAby WLPWXQPHm2El6Y2nwKOT/C/KooXaDaJgEtfHN0DdWZUXgfdbyYUz6oHS6KuRO9N6bQh5 4zMU9T6ktmUg23GE8DlRPiEwC5er3zb4l5bzs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=vfeNBpk2+tsKOAwRs7J5qjdUQNz+AcAZjRNhFxTuAcljNFfroAZWSW7xkvGIuYA+LE n4N4iJY/VbLcZyHmvEaqao+w8Yx6tP/XUXFafimCwu6Nf5vR+gAaOZeuzRc10kvd/YAc P2J1yvRBDfzy2BnP/eiVgGFX5y3/T1mDLcQ8M= MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.239.193.16 with SMTP id g16mr842004hbi.90.1264458788197; Mon, 25 Jan 2010 14:33:08 -0800 (PST) In-Reply-To: <4B5E16DB.2080203@delphij.net> References: <4B5E16DB.2080203@delphij.net> Date: Mon, 25 Jan 2010 23:33:08 +0100 X-Google-Sender-Auth: 9cf614f7046cbcd6 Message-ID: From: Antoine Brodin To: d@delphij.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Robert Watson , freebsd-net@freebsd.org, delphij@freebsd.org, jhb@freebsd.org Subject: Re: [PATCH] Interface description X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 22:33:10 -0000 On Mon, Jan 25, 2010 at 11:10 PM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I have revised the patchset based on feedback received. =A0This version: > > =A0- Unbreak the case when libpcap is being built for pre-ifdescr world. > =A0- Documents the descr and -descr primitives for ifconfig(8), they are > intended for OpenBSD compatibility. > =A0- Simplify and concentrate memory allocation in ifconfig(8) > =A0- Document the use of nul terminated buffer and the meaning of length > parameter > =A0- Use char* instead of sbuf and simplify the logic in kernel part. > > Hopefully this version would address all problems raised by reviewers. > Comments? A few comments: in contrib/libpcap/inet.c: I think "int s;" can stay under #ifdef SIOCGIFDESCR in sbin/ifconfig/ifconfig.c: do { ... if (...) { descrlen *=3D 2; continue; } ... } while (0); I think there is no retry with larger buffer (while (0)) Perhaps you want while (1) + some breaks Cheers, Antoine