lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110524190334.GE28521@hmsreliant.think-freely.org>
Date:	Tue, 24 May 2011 15:03:34 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	bhutchings@...arflare.com
Subject: Re: [PATCH 1/2] net: move is_vlan_dev into public header file (v2)

On Tue, May 24, 2011 at 11:36:35AM -0700, Joe Perches wrote:
> On Tue, 2011-05-24 at 14:31 -0400, Neil Horman wrote:
> > Migrate is_vlan_dev() to if_vlan.h so that core networkig can use it
> []
> > diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> []
> > @@ -110,6 +110,11 @@ static inline void vlan_group_set_device(struct vlan_group *vg,
> >  	array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev;
> >  }
> >  
> > +static inline int is_vlan_dev(struct net_device *dev)
> > +{
> > +        return dev->priv_flags & IFF_802_1Q_VLAN;
> > +}
> 
> perhaps:
> 
> static bool is_vlan_dev(const struct net_device *dev)
> {
> 	return !!(dev->priv_flags & IFF_802_1Q_VLAN);
> }
> 
I migrated this directly out of vlan.h as is.  I suppose we could change it, but
I'm not sure I see a need to do so immediately. All callers of this function
already work with it properly as defined currently (not that they wouldn't
otherwise).

Perhaps we could do a separate patch to fix this up as well as other common test
functions (br_port_exists, is_valid_iface, macvlan_port_exists,
netif_is_bond_slave, etc), all just return the result of a bitwise and
currently)

Neil

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ