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))
> >> return -EINVAL;
> >>
> >> to every ethernet driver's ->open() hook.
> >
> > The first idea I get is:
> >
> > 1) Create netdev->validate_dev_addr().
> >
> > 2) If it exists, invoke it before ->open(), abort
> > and return if any errors signaled.
> >
> > etherdev init hooks up a function that does the above
> > check, which allows us to avoid editing every ethernet
> > driver
> >
> > What do you think?
>
> Seems sane to me. Something like this (attached)?
Looks great:
Acked-by: David S. Miller <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]