Do not use senderr() in rtrequest1_fib_change().

Suggested by:	glebius
MFC after:	4 weeks
This commit is contained in:
Alexander V. Chernikov 2014-04-29 12:52:36 +00:00
parent b05e961602
commit a713ee5cf7

View File

@ -1431,7 +1431,6 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
#undef ifpaddr
#undef flags
#define senderr(e) { error = e; goto bad; }
static int
rtrequest1_fib_change(struct radix_node_head *rnh, struct rt_addrinfo *info,
struct rtentry **ret_nrt, u_int fibnum)
@ -1476,7 +1475,7 @@ rtrequest1_fib_change(struct radix_node_head *rnh, struct rt_addrinfo *info,
free_ifa = 1;
if (error != 0)
senderr(error);
goto bad;
}
/* Check if outgoing interface has changed */
@ -1489,7 +1488,7 @@ rtrequest1_fib_change(struct radix_node_head *rnh, struct rt_addrinfo *info,
if (info->rti_info[RTAX_GATEWAY] != NULL) {
error = rt_setgate(rt, rt_key(rt), info->rti_info[RTAX_GATEWAY]);
if (error != 0)
senderr(error);
goto bad;
rt->rt_flags &= ~RTF_GATEWAY;
rt->rt_flags |= (RTF_GATEWAY & info->rti_flags);
@ -1517,8 +1516,6 @@ rtrequest1_fib_change(struct radix_node_head *rnh, struct rt_addrinfo *info,
ifa_free(info->rti_ifa);
return (error);
}
#undef senderr
int
rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate)