[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIOCGIFHWADDR support for pfinet
From: |
Marco Gerards |
Subject: |
Re: SIOCGIFHWADDR support for pfinet |
Date: |
Wed, 09 Feb 2005 19:30:36 +0000 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> writes:
> At Tue, 03 Aug 2004 16:03:11 +0200,
> Marco Gerards wrote:
>> On debian-hurd someone noticed SIOCGIFHWADDR does not exist for
>> GNU/Hurd. I have included the required patches for the Hurd and glibc
>> with this email. Or can someone suggest a better way to read the
>> hardware address?
>
> It seems basically ok to me. However, I think that two small changes
> could/should be made.
>
> 1. Only copy dev->addr_len bytes into the user buffer. It's best to
> give out less information than more.
Right.
> 2. Independent of that, do we need to check if there even is a
> hardware address? For example, what is the dev_addr of the
> loopback interface? How does Linux ifconfig detect that the
> loopback interface doesn't have a valid MAC? Do we initialize it
> correctly in loopback.c and does your code deal with it in a
> compatible way?
My guess is that it will be -1 or so. But I can check that to be
sure.
> I didn't do much to try to answer the second question, although the
> answer should be readily available by looking at Linux and net-tools
> source code. Once we have determined that unconditionally copying the
> dev_addr field is ok, or did an appropriate check, it can go in (with
> the addr_len change mentioned above).
Ok.
Thanks,
Marco