lkml.org 
[lkml]   [2007]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] e1000, e1000e valid-addr fixes
    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 created the attached -bug fix- patch as illustration, though I
    > have not committed it, waiting for comment.
    >
    > This patch will make no difference for users hitting invalid-eep-csum
    > rather than invalid-MAC-addr condition, but it's a problem I noticed
    > while reviewing Adam's patch in detail.


    Adding my own comment :)

    Does the ethernet stack check is_valid_ether_addr() before permitting
    interface-up?

    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.

    Jeff


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-10-24 03:07    [W:0.096 / U:0.656 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site