On Fri, Apr 15, 2016 at 3:10 PM, Geoff Wing <[email protected]> wrote:
> On Friday 2016-04-15 13:20 +1000, Geoff Wing output:
> :panic: kernel .... "(la->la_flags & LLE_STATIC) == 0 failed: .. if_arp", 
> line 1220
> :It also deletes and adds in a static arp address:
> :       "arp -d 1.2.3.4; arp -s 1.2.3.4 xx:xx:xx:xx:xx:xx"
>
> Taking out the static arp commands and it boots up OK.

Thanks. I could reproduce the panic on my machine with the latest kernel.

A quick fix is like this:

--- a/sys/netinet/if_arp.c
+++ b/sys/netinet/if_arp.c
@@ -1223,10 +1223,11 @@ in_arpinput(struct mbuf *m)
        KASSERT(sizeof(la->ll_addr) >= ifp->if_addrlen);
        (void)memcpy(&la->ll_addr, ar_sha(ah), ifp->if_addrlen);
        la->la_flags |= LLE_VALID;
-       la->la_expire = time_uptime + arpt_keep;
+       if ((la->la_flags & LLE_STATIC) == 0) {
+               la->la_expire = time_uptime + arpt_keep;
+               arp_settimer(la, arpt_keep);
+       }
        la->la_asked = 0;
-       KASSERT((la->la_flags & LLE_STATIC) == 0);
-       arp_settimer(la, arpt_keep);
        /* rt->rt_flags &= ~RTF_REJECT; */

Does this patch help you?

If so, I'll commit it (with tweaks maybe) after more validations.

Thanks,
  ozaki-r

Reply via email to