Author: dchagin Date: Thu Jun 9 05:23:28 2011 New Revision: 222888 URL: http://svn.freebsd.org/changeset/base/222888
Log: MFC r219783, r219786: A bit rearranged rtalloc1_fib() code. To avoid code duplication move the miss label to line up and jump on it. Modified: stable/8/sys/net/route.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Thu Jun 9 05:21:08 2011 (r222887) +++ stable/8/sys/net/route.c Thu Jun 9 05:23:28 2011 (r222888) @@ -349,13 +349,12 @@ rtalloc1_fib(struct sockaddr *dst, int r fibnum = 0; rnh = rt_tables_get_rnh(fibnum, dst->sa_family); newrt = NULL; + if (rnh == NULL) + goto miss; + /* * Look up the address in the table for that Address Family */ - if (rnh == NULL) { - V_rtstat.rts_unreach++; - goto miss; - } needlock = !(ignflags & RTF_RNH_LOCKED); if (needlock) RADIX_NODE_HEAD_RLOCK(rnh); @@ -380,8 +379,9 @@ rtalloc1_fib(struct sockaddr *dst, int r * Which basically means * "caint get there frm here" */ - V_rtstat.rts_unreach++; miss: + V_rtstat.rts_unreach++; + if (report) { /* * If required, report the failure to the supervising _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"