Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2012 22:33:31 -0400
From:      "Devon H. O'Dell" <devon.odell@gmail.com>
To:        bug-followup@FreeBSD.org, freebsd-net@freebsd.org, gavin@freebsd.org
Subject:   Re: kern/110284: [if_ethersubr] Invalid Assumption in SIOCSIFADDR in ether_ioctl()
Message-ID:  <CAFgOgC9k7wuw%2BJi7wyLMjOBzGko5fPw1o2UGQdvetC8Q6ge1vw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi Gavin, freebsd-net,

I submitted this PR when I worked at Coyote Point. I'm no longer
there, but I do remember this issue well. The discussion around this
patch happened on IRC and not the PR, which is unfortunate. If I
recall correctly, rwatson's stance was that the real fix was to fix
the heinous layer between ioctl and device. As far as I'm aware, this
is still an issue with current drivers, and this patch still solves
the issue. CP ran with it successfully for years. (And unsuccessfully
for a time before it was implemented :)).

The patch is basically (forgive formatting):

--- if_ethersubr.c      2011-09-22 20:51:37.000000000 -0400
+++ /home/dho/if_ethersubr.c    2012-05-16 22:27:17.000000000 -0400
@@ -1146,7 +1146,9 @@
                switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
                case AF_INET:
-                       ifp->if_init(ifp->if_softc);    /* before arpwhohas */
+                       if (ifp->if_flags & IFF_RUNNING == 0) {
+                               ifp->if_init(ifp->if_softc);    /*
before arpwhohas */
+                       }
                        arp_ifinit(ifp, ifa);
                        break;
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFgOgC9k7wuw%2BJi7wyLMjOBzGko5fPw1o2UGQdvetC8Q6ge1vw>