lkml.org 
[lkml]   [2006]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Bug in the RTM_SETLINK kernel API for setting MAC address
From
From: Pavlin Radoslavov <pavlin@icir.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@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: 2006-08-08 05:51    [W:0.051 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site