Date: Wed, 31 Oct 2007 05:42:48 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 128392 for review Message-ID: <200710310542.l9V5gmBp015256@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=128392 Change 128392 by kmacy@kmacy:storage:toestack on 2007/10/31 05:42:44 resolve the host interface MAC address not the non-existent gateway Affected files ... .. //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.c#9 edit Differences ... ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.c#9 (text+ko) ==== @@ -179,7 +179,7 @@ again: switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ - arpresolve(rt->rt_ifp, rt, NULL, rt->rt_gateway, RT_ENADDR(rt)); + arpresolve(rt->rt_ifp, rt, NULL, rt_key(rt), RT_ENADDR(rt)); mtx_lock(&e->lock); if (e->state == L2T_STATE_STALE) e->state = L2T_STATE_VALID; @@ -205,7 +205,7 @@ * entries when there's no memory. */ printf("doing arpresolve\n"); - if (arpresolve(rt->rt_ifp, rt, NULL, rt->rt_gateway, RT_ENADDR(rt)) == 0) { + if (arpresolve(rt->rt_ifp, rt, NULL, rt_key(rt), RT_ENADDR(rt)) == 0) { if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) return (ENOMEM); @@ -235,7 +235,7 @@ again: switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ - arpresolve(rt->rt_ifp, rt, m0, rt->rt_gateway, RT_ENADDR(rt)); + arpresolve(rt->rt_ifp, rt, m0, rt_key(rt), RT_ENADDR(rt)); mtx_lock(&e->lock); if (e->state == L2T_STATE_STALE) { e->state = L2T_STATE_VALID; @@ -262,7 +262,7 @@ * A better way would be to use a work request to retry L2T * entries when there's no memory. */ - arpresolve(rt->rt_ifp, rt, m0, rt->rt_gateway, RT_ENADDR(rt)); + arpresolve(rt->rt_ifp, rt, m0, rt_key(rt), RT_ENADDR(rt)); } return; @@ -302,6 +302,7 @@ } e->state = L2T_STATE_UNUSED; } + return e; } @@ -392,6 +393,8 @@ e->ifindex = ifidx; e->smt_idx = smt_idx; atomic_store_rel_int(&e->refcnt, 1); + e->neigh = NULL; + neigh_replace(e, neigh); #ifdef notyet /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710310542.l9V5gmBp015256>