mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pavlin@icir.org
Cc: linux-kernel@vger.kernel.org, roland@topspin.com
Subject: Re: Bug in the RTM_SETLINK kernel API for setting MAC address
Date: Mon, 07 Aug 2006 20:48:10 -0700 (PDT)	[thread overview]
Message-ID: <20060807.204810.11384152.davem@davemloft.net> (raw)
In-Reply-To: <200608080340.k783eOfH076445@possum.icir.org>

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;

  reply	other threads:[~2006-08-08  3:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08  3:40 Pavlin Radoslavov
2006-08-08  3:48 ` David Miller [this message]
2006-08-08  5:31   ` Pavlin Radoslavov
2006-08-08  6:35     ` David Miller
2006-08-08 18:26       ` Pavlin Radoslavov
2006-08-08 23:47         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060807.204810.11384152.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavlin@icir.org \
    --cc=roland@topspin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®