tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ifconfig -a error



On Mon, 4 Aug 2008, Iain Hibbert wrote:

> with the new ifconfig (on i386) I notice an error
>
> % ifconfig -a
> eon0: flags=3<UP,BROADCAST> mtu 1500
> ifconfig: link_status: ioctl: Invalid argument

with the following patch

--- /usr/src/sys/netiso/if_eon.c        2008-06-20 17:32:11.000000000 +0100
+++ if_eon.c    2008-08-13 09:36:55.000000000 +0100
@@ -135,6 +135,7 @@ void
 eonattach(void)
 {
        struct ifnet *ifp = eonif;
+       uint8_t lla[] = { 0x00, 0x00, 0x00, 0x00, 0x00 };

 #ifdef ARGO_DEBUG
        if (argo_debug[D_EON]) {
@@ -153,7 +154,7 @@ eonattach(void)
        ifp->if_hdrlen = EONIPLEN;
        ifp->if_flags = IFF_BROADCAST;
        if_attach(ifp);
-       if_alloc_sadl(ifp);
+       if_set_sadl(ifp, lla, sizeof(lla));
        eonioctl(ifp, SIOCSIFADDR, ifp->if_dl);
        eon_llinfo.el_qhdr.link =
                eon_llinfo.el_qhdr.rlink = &(eon_llinfo.el_qhdr);

then the ifconfig proceeds thus:

% ifconfig eon0
eon0: flags=3<UP,BROADCAST> mtu 1500
        address: 00:00:00:00:00

now, clearly this is not right but it indicates that eonattach is not
setting the address properly. What is the eon address supposed to be?

The SIOCSIFADDR ioctl doesn't actually set any address, it just marks the
interface as up (seems wrong :). I don't see any documentation about eon
(weirdly, a commented out ".Xr eon 5" line in ifconfig.8), are there any
users? (is?)

iain


Home | Main Index | Thread Index | Old Index