Correctly set error in rt_mpath_unlink
It is possible for rn_delete() to return NULL. If this happens, then set *perror to ESRCH, as is done in the rest of the function. Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D25871
This commit is contained in:
parent
9eb0cd08ae
commit
f7d79f6c6d
@ -1107,7 +1107,11 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrinfo *info,
|
||||
rn = rnh->rnh_deladdr(info->rti_info[RTAX_DST],
|
||||
info->rti_info[RTAX_NETMASK],
|
||||
&rnh->head);
|
||||
*perror = 0;
|
||||
if (rn != NULL) {
|
||||
*perror = 0;
|
||||
} else {
|
||||
*perror = ESRCH;
|
||||
}
|
||||
return (rn);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user