Date: Tue, 13 Jan 2015 08:27:44 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277120 - projects/ifnet/sys/compat/linux Message-ID: <201501130827.t0D8RiHC058843@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501130827.t0D8RiHC058843>