From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 1 19:18:09 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7FDC7506 for ; Thu, 1 Aug 2013 19:18:09 +0000 (UTC) (envelope-from rnewpol@panasas.com) Received: from natasha.panasas.com (natasha.panasas.com [67.152.220.90]) by mx1.freebsd.org (Postfix) with ESMTP id 45B1325A7 for ; Thu, 1 Aug 2013 19:18:08 +0000 (UTC) Received: from zenyatta.panasas.com (zenyatta.int.panasas.com [172.17.28.63]) by natasha.panasas.com (8.13.1/8.13.1) with ESMTP id r71JI8B6012858 for ; Thu, 1 Aug 2013 15:18:08 -0400 Received: from ZENYATTA.int.panasas.com ([fe80::44ca:f0e1:b97e:bf79]) by zenyatta.int.panasas.com ([fe80::44ca:f0e1:b97e:bf79%15]) with mapi id 14.01.0438.000; Thu, 1 Aug 2013 15:18:08 -0400 From: "Newpol, Richard" To: "freebsd-hackers@freebsd.org" Subject: Problem with lagg driver? Thread-Topic: Problem with lagg driver? Thread-Index: Ac6O69rfRbIh7q8wTF+L0UnmsLA63Q== Date: Thu, 1 Aug 2013 19:18:08 +0000 Message-ID: <1A778AD3F807B340B7EB1BD1B9C196773D6560C0@zenyatta.int.panasas.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.28.30] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 19:18:09 -0000 All, We seem to have discovered a problem that occurs when adding an address (or= alias) to a DOWNed lagg interface. After adding an address, when you try t= o bring the interface UP it can't reach the desired networks. Turns out that the problem occurs because the lagg driver silently passes t= he SIOCSIFADDR ioctl to the "ether_ioctl" handler, which in turn always set= s the IFF_UP flag. While this is usually ok (since ifconfig
implies UP with the= first assigned address anyway), the lagg driver does not have the proper h= andling to actually change state to UP on the first address, so it ends up = in an inconsistent state. Then, when the user eventually does an "ifconfig = lagg up" the default subnet routes are not added (because the "interface up= " code sees that IFF_UP is already set). So my first question - is this a known problem, or has it been addressed in= some other way? Secondly, I can think of two ways to fix this, and was wondering what are t= he implications. The first way would be for the lagg driver to correctly br= ing itself up when the first address is added to it. The second way would b= e for the lagg driver to preserve the state of IFF_FLAG when handling SIOCS= IFADDR. I like the second way because it is less of an overall behaviour ch= ange from the current, but the first way seems more correct. Rich Newpol Panasas