From owner-svn-src-projects@FreeBSD.ORG Tue Jan 13 08:27:44 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDC1D1B0; Tue, 13 Jan 2015 08:27:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 CB06B9CC; Tue, 13 Jan 2015 08:27:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0D8Rirx058844; Tue, 13 Jan 2015 08:27:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D8RiHC058843; Tue, 13 Jan 2015 08:27:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130827.t0D8RiHC058843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 08:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277120 - projects/ifnet/sys/compat/linux X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 08:27:45 -0000 Author: glebius Date: Tue Jan 13 08:27:43 2015 New Revision: 277120 URL: https://svnweb.freebsd.org/changeset/base/277120 Log: Make COMPAT_LINUX compilable with new ifnet(9) code. Sponsored by: Nginx, Inc. Modified: projects/ifnet/sys/compat/linux/linux_ioctl.c Modified: projects/ifnet/sys/compat/linux/linux_ioctl.c ============================================================================== --- projects/ifnet/sys/compat/linux/linux_ioctl.c Tue Jan 13 08:26:56 2015 (r277119) +++ projects/ifnet/sys/compat/linux/linux_ioctl.c Tue Jan 13 08:27:43 2015 (r277120) @@ -2106,7 +2106,7 @@ linux_ioctl_console(struct thread *td, s /* * Criteria for interface name translation */ -#define IFP_IS_ETH(ifp) (ifp->if_type == IFT_ETHER) +#define IFP_IS_ETH(ifp) (if_type(ifp) == IFT_ETHER) /* * Interface function used by linprocfs (at the time of writing). It's not @@ -2299,10 +2299,9 @@ linux_gifflags(struct thread *td, struct { l_short flags; - flags = (ifp->if_flags | ifp->if_drv_flags) & 0xffff; + flags = ifp->if_flags & 0xffff; /* these flags have no Linux equivalent */ - flags &= ~(IFF_DRV_OACTIVE|IFF_SIMPLEX| - IFF_LINK0|IFF_LINK1|IFF_LINK2); + flags &= ~(IFF_SIMPLEX|IFF_LINK0|IFF_LINK1|IFF_LINK2); /* Linux' multicast flag is in a different bit */ if (flags & IFF_MULTICAST) { flags &= ~IFF_MULTICAST; @@ -2322,13 +2321,13 @@ linux_gifhwaddr(struct ifnet *ifp, struc struct sockaddr_dl *sdl; struct l_sockaddr lsa; - if (ifp->if_type == IFT_LOOP) { + if (if_type(ifp) == IFT_LOOP) { bzero(&lsa, sizeof(lsa)); lsa.sa_family = ARPHRD_LOOPBACK; return (copyout(&lsa, &ifr->ifr_hwaddr, sizeof(lsa))); } - if (ifp->if_type != IFT_ETHER) + if (if_type(ifp) != IFT_ETHER) return (ENOENT); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {