Re: [PATCH 00/12] Part 2: check given MAC address, if invalid return -EADDRNOTAVAIL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Samstag, 25. Februar 2012, Geert Uytterhoeven wrote:
> 2012/2/24 Michał Mirosław <mirqus@xxxxxxxxx>:
> > 2012/2/24 Danny Kukawka <danny.kukawka@xxxxxxxxx>:
> >> Second Part of series patches to unifiy the return value of
> >> .ndo_set_mac_address if the given address isn't valid.
> >>
> >> These changes check if a given (MAC) address is valid in
> >> .ndo_set_mac_address, if invalid return -EADDRNOTAVAIL
> >> as eth_mac_addr() already does if is_valid_ether_addr() fails.
> >
> > Why not just fix dev_set_mac_address() and make do_setlink() use that?
>
> BTW, it's also called from dev_set_mac_address().
>
> > Checks are specific to address family, not device model I assume.
>
> Indeed, why can't this be done in one single place, instead of sprinkling
> these checks over all drivers, missing all out-of-tree (note: I don't care)
> and all soon-to-be-submitted drivers?

Since the .ndo_set_mac_address functions are used by some drivers internally 
too, you may get some new checks on other places. But I'll take a look at it.

Danny

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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux