mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
A bit rearranged rtalloc1_fib() code.
Initialize a variable when it is really needed. To avoid code duplication move the miss label to line up and jump on it. MFC after: 1 Week
This commit is contained in:
parent
6d8b3c2f9f
commit
523e60025b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219783
@ -348,14 +348,13 @@ rtalloc1_fib(struct sockaddr *dst, int report, u_long ignflags,
|
||||
if (dst->sa_family != AF_INET) /* Only INET supports > 1 fib now */
|
||||
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;
|
||||
}
|
||||
newrt = NULL;
|
||||
needlock = !(ignflags & RTF_RNH_LOCKED);
|
||||
if (needlock)
|
||||
RADIX_NODE_HEAD_RLOCK(rnh);
|
||||
@ -380,8 +379,9 @@ rtalloc1_fib(struct sockaddr *dst, int report, u_long ignflags,
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user