From owner-svn-src-stable-10@freebsd.org Thu Feb 25 15:33:56 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F982AB2790; Thu, 25 Feb 2016 15:33:56 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D9A9B28; Thu, 25 Feb 2016 15:33:56 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1PFXtQs084476; Thu, 25 Feb 2016 15:33:55 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1PFXt3Y084475; Thu, 25 Feb 2016 15:33:55 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201602251533.u1PFXt3Y084475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 25 Feb 2016 15:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296040 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2016 15:33:56 -0000 Author: araujo Date: Thu Feb 25 15:33:55 2016 New Revision: 296040 URL: https://svnweb.freebsd.org/changeset/base/296040 Log: MFH 295796 (based on) Fix regression introduced on 272446r. lagg(4) supports the protocol none, where it disables any traffic without disabling the lagg(4) interface itself. PR: 206478 Submitted by: Erin Clark Reviewed by: rpokala, bapt Approved by: re (glebius) Differential Revision: https://reviews.freebsd.org/D5188 Modified: stable/10/sys/net/if_lagg.c Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Thu Feb 25 14:29:57 2016 (r296039) +++ stable/10/sys/net/if_lagg.c Thu Feb 25 15:33:55 2016 (r296040) @@ -1051,7 +1051,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } } - if (proto->ti_proto == LAGG_PROTO_NONE) { + if (proto->ti_proto >= LAGG_PROTO_MAX) { error = EPROTONOSUPPORT; break; } @@ -1081,7 +1081,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd LAGG_WUNLOCK(sc); } else LAGG_WUNLOCK(sc); - proto->ti_attach(sc); + if (proto->ti_proto != LAGG_PROTO_NONE) + proto->ti_attach(sc); LAGG_WLOCK(sc); sc->sc_proto = proto->ti_proto; LAGG_WUNLOCK(sc);