Date: Tue, 30 Dec 2008 00:19:06 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r186579 - user/kmacy/HEAD_fast_net/sys/netinet Message-ID: <200812300019.mBU0J6V3070738@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Tue Dec 30 00:19:06 2008 New Revision: 186579 URL: http://svn.freebsd.org/changeset/base/186579 Log: cleanup upgrade / downgrade checks for route and lle Modified: user/kmacy/HEAD_fast_net/sys/netinet/ip_output.c Modified: user/kmacy/HEAD_fast_net/sys/netinet/ip_output.c ============================================================================== --- user/kmacy/HEAD_fast_net/sys/netinet/ip_output.c Tue Dec 30 00:15:12 2008 (r186578) +++ user/kmacy/HEAD_fast_net/sys/netinet/ip_output.c Tue Dec 30 00:19:06 2008 (r186579) @@ -635,18 +635,18 @@ done: struct llentry *la; wlocked = INP_WLOCKED(inp); + if ((neednewlle || neednewroute) && + !wlocked && INP_TRY_UPGRADE(inp) == 0) + return (error); + if (inp == NULL || (inp->inp_vflag & INP_RT_VALID) == 0) RTFREE(ro->ro_rt); else if (neednewroute && ro->ro_rt != inp->inp_rt) { - if (!wlocked && INP_TRY_UPGRADE(inp) == 0) - return (error); RTFREE(inp->inp_rt); inp->inp_rt = ro->ro_rt; } if (neednewlle) { - if (!wlocked && INP_TRY_UPGRADE(inp) == 0) - return (error); IF_AFDATA_RLOCK(ifp); la = lla_lookup(LLTABLE(ifp), LLE_EXCLUSIVE, (struct sockaddr *)dst); @@ -667,7 +667,7 @@ done: } else if (la != NULL) LLE_WUNLOCK(la); } - if (!wlocked) + if ((neednewlle || neednewroute) && !wlocked) INP_DOWNGRADE(inp); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812300019.mBU0J6V3070738>