Stephen Hemminger wrote:
How about:
static int eth_validate_addr(const struct net_device *dev)
{
return is_valid_ether_addr(dev->dev_addr) ? 0 : -EINVAL;
}
hmmm -- its a slow path, so I don't see the value of marking the
argument 'const' -- right now this implementation merely reads t
Kok, Auke wrote:
David Miller wrote:
From: Jeff Garzik <[EMAIL PROTECTED]>
Date: Tue, 23 Oct 2007 22:20:30 -0400
David Miller wrote:
From: Jeff Garzik <[EMAIL PROTECTED]>
Date: Tue, 23 Oct 2007 21:03:36 -0400
I'm wondering if there is a way to avoid adding
if (!is_valid_ether_addr(
How about:
static int eth_validate_addr(const struct net_device *dev)
{
return is_valid_ether_addr(dev->dev_addr) ? 0 : -EINVAL;
}
--
Stephen Hemminger <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
Mo
David Miller wrote:
> From: Jeff Garzik <[EMAIL PROTECTED]>
> Date: Tue, 23 Oct 2007 22:20:30 -0400
>
>> David Miller wrote:
>>> From: Jeff Garzik <[EMAIL PROTECTED]>
>>> Date: Tue, 23 Oct 2007 21:03:36 -0400
>>>
I'm wondering if there is a way to avoid adding
if (!is_valid_ether
From: Jeff Garzik <[EMAIL PROTECTED]>
Date: Tue, 23 Oct 2007 22:20:30 -0400
> David Miller wrote:
> > From: Jeff Garzik <[EMAIL PROTECTED]>
> > Date: Tue, 23 Oct 2007 21:03:36 -0400
> >
> >> I'm wondering if there is a way to avoid adding
> >>
> >>if (!is_valid_ether_addr(dev->dev_addr))
> >>
David Miller wrote:
From: Jeff Garzik <[EMAIL PROTECTED]>
Date: Tue, 23 Oct 2007 21:03:36 -0400
I'm wondering if there is a way to avoid adding
if (!is_valid_ether_addr(dev->dev_addr))
return -EINVAL;
to every ethernet driver's ->open() hook.
The first idea I get is:
On Tue, Oct 23, 2007 at 08:55:29PM -0400, Jeff Garzik wrote:
> Actually, looking over the code I see obvious bugs in the logic:
>
> An invalid ethernet address should not cause device loading to fail,
> because the user is given the opportunity to supply a MAC address via
> userspace (ifconfig or
From: Jeff Garzik <[EMAIL PROTECTED]>
Date: Tue, 23 Oct 2007 21:03:36 -0400
> I'm wondering if there is a way to avoid adding
>
> if (!is_valid_ether_addr(dev->dev_addr))
> return -EINVAL;
>
> to every ethernet driver's ->open() hook.
The first idea I get is:
1) Create netd
Jeff Garzik wrote:
Actually, looking over the code I see obvious bugs in the logic:
An invalid ethernet address should not cause device loading to fail,
because the user is given the opportunity to supply a MAC address via
userspace (ifconfig or whatever) before the interface goes up.
I just
Actually, looking over the code I see obvious bugs in the logic:
An invalid ethernet address should not cause device loading to fail,
because the user is given the opportunity to supply a MAC address via
userspace (ifconfig or whatever) before the interface goes up.
I just created the attache
10 matches
Mail list logo