On 28/08/16(Sun) 13:39, Martijn van Duren wrote: > Hello bugs, > > I just had the following panic switching from wireless to wired when > doing a dhclient.
What do you mean by "switching"? What did you do? Could you please tell me if the diff below fix your issue? The 'flushclone' call when adding a route is unnecessary and exposes a bug introduced when we added support for multiple RTF_CONNECTED. Index: net/route.c =================================================================== RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.317 diff -u -p -r1.317 route.c --- net/route.c 22 Aug 2016 16:53:59 -0000 1.317 +++ net/route.c 29 Aug 2016 11:07:13 -0000 @@ -927,12 +927,13 @@ rtrequest_delete(struct rt_addrinfo *inf return (ESRCH); } - /* clean up any cloned children */ - if ((rt->rt_flags & RTF_CLONING) != 0) - rtflushclone(tableid, rt); - + /* Release next hop cache before flushing cloned entries. */ rt_putgwroute(rt); + /* Clean up any cloned children. */ + if (ISSET(rt->rt_flags, RTF_CLONING)) + rtflushclone(tableid, rt); + rtfree(rt->rt_parent); rt->rt_parent = NULL; @@ -1177,11 +1178,6 @@ rtrequest(int req, struct rt_addrinfo *i return (EEXIST); } ifp->if_rtrequest(ifp, req, rt); - - if ((rt->rt_flags & RTF_CLONING) != 0) { - /* clean up any cloned children */ - rtflushclone(tableid, rt); - } if_group_routechange(info->rti_info[RTAX_DST], info->rti_info[RTAX_NETMASK]);