[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 07 Aug 2006 20:48:10 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: pavlin@...r.org
Cc: linux-kernel@...r.kernel.org, roland@...spin.com
Subject: Re: Bug in the RTM_SETLINK kernel API for setting MAC address
From: Pavlin Radoslavov <pavlin@...r.org>
Date: Mon, 07 Aug 2006 20:40:24 -0700
> Note that the payload with the MAC address has to be
> "struct sockaddr" (or equivalent) and the length of that payload is
> the equivalent of "sizeof(sa_family) + mac_address_size".
It should just be the MAC address, that's why the kernel side
is coded the way it is.
Where does this sockaddr come from?
I don't see how it could work with the sockaddr there in
2.6.17, as 2.6.17 makes the same exact length check:
if (ida[IFLA_ADDRESS - 1]->rta_len != RTA_LENGTH(dev->addr_len))
goto out;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists