From owner-freebsd-net@FreeBSD.ORG Tue Jan 25 04:16:06 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 460C116A4CF for ; Tue, 25 Jan 2005 04:16:06 +0000 (GMT) Received: from mail.ntmk.ru (mail.ntmk.ru [217.114.241.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21DEF43D39 for ; Tue, 25 Jan 2005 04:16:05 +0000 (GMT) (envelope-from boris@ntmk.ru) Received: from boris.nikom.ru ([10.1.16.195]) by mail.ntmk.ru with esmtp (Exim 4.34) id 1CtI7W-0001UE-NA; Tue, 25 Jan 2005 09:16:02 +0500 Message-ID: <41F5C802.8010307@ntmk.ru> Date: Tue, 25 Jan 2005 09:16:02 +0500 From: Boris Kovalenko User-Agent: Mozilla Thunderbird 1.0 (X11/20041228) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brooks Davis , freebsd-net@freebsd.org References: <41F33E9F.9090301@tagnet.ru> <20050123193711.GB29225@odin.ac.hmc.edu> <41F46C3C.20205@ntmk.ru> <20050124170735.GA26830@odin.ac.hmc.edu> In-Reply-To: <20050124170735.GA26830@odin.ac.hmc.edu> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] 802.1p priority (fixed) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 04:16:06 -0000 Hello! > by this specific implementation. I'm sure we can keep an interface that > handles priorities as seperate interfaces, but I'm not sure we'll want > to do it via the vlan device (attractivly simple though that is.) > > This patch appears to be against 4 or 5. In 6 we've largly rewritten > ifconfig so the patch won't apply. It looks like a simple matter to fix > this issue. We'll need to commit to 6 before 4 or 5. > > I've embeded some comments in the text below. Ok, so what I should do now? Rewrite patch for 6? >>+ if(tag < 1 || tag > 4094) >>+ errx(1, "VLAN ID shoud be in range 1..4094"); > > > errx should be fully indented. What this means? What difference between my errx and this one (from 6)? errx(1, "must specify both vlan tag and device"); > I know other nearby code does this, but atoi should not be used. It has > not useful error checking. strtoul should be used instead. No problem. >> */ >> struct vlanreq { >>- char vlr_parent[IFNAMSIZ]; >>- u_short vlr_tag; >>+ char vlr_parent[IFNAMSIZ]; >>+ u_int16_t vlr_tag; > > > This appears to be a no-op. Is it needed? Hmm... just to clarify that vlr_tag is 16bit value. If this is unnecessary I may use u_short. -- With respect, Boris