From owner-svn-src-all@freebsd.org Sun Feb 25 11:29:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0716F297EF; Sun, 25 Feb 2018 11:29:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CBCD78649; Sun, 25 Feb 2018 11:29:55 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9386E4521; Sun, 25 Feb 2018 11:29:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1PBTtNt044080; Sun, 25 Feb 2018 11:29:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1PBTtuN044079; Sun, 25 Feb 2018 11:29:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201802251129.w1PBTtuN044079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 25 Feb 2018 11:29: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: r329982 - stable/10/sys/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/netinet X-SVN-Commit-Revision: 329982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 11:29:56 -0000 Author: hselasky Date: Sun Feb 25 11:29:55 2018 New Revision: 329982 URL: https://svnweb.freebsd.org/changeset/base/329982 Log: Fix for LINT-{NOINET,NOINET6,NOIP} kernel builds. This is a direct commit. Reported by: rpokala@ Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet/toecore.c Modified: stable/10/sys/netinet/toecore.c ============================================================================== --- stable/10/sys/netinet/toecore.c Sun Feb 25 10:52:46 2018 (r329981) +++ stable/10/sys/netinet/toecore.c Sun Feb 25 11:29:55 2018 (r329982) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(KLD_MODULE) || defined(INET) || defined(INET6) + #include #include #include @@ -357,12 +359,20 @@ toe_4tuple_check(struct in_conninfo *inc, struct tcphd struct inpcb *inp; if (inc->inc_flags & INC_ISIPV6) { +#if defined(KLD_MODULE) || defined(INET6) inp = in6_pcblookup(&V_tcbinfo, &inc->inc6_faddr, inc->inc_fport, &inc->inc6_laddr, inc->inc_lport, INPLOOKUP_WLOCKPCB, ifp); +#else + inp = NULL; +#endif } else { +#if defined(KLD_MODULE) || defined(INET) inp = in_pcblookup(&V_tcbinfo, inc->inc_faddr, inc->inc_fport, inc->inc_laddr, inc->inc_lport, INPLOOKUP_WLOCKPCB, ifp); +#else + inp = NULL; +#endif } if (inp != NULL) { INP_WLOCK_ASSERT(inp); @@ -641,5 +651,8 @@ static moduledata_t mod_data= { 0 }; -MODULE_VERSION(toecore, 1); DECLARE_MODULE(toecore, mod_data, SI_SUB_EXEC, SI_ORDER_ANY); +#endif /* defined(KLD_MODULE) || defined(INET) || defined(INET6) */ + +MODULE_VERSION(toecore, 1); +