ipv4: fix error return code in rtm_to_fib_config()
authorZhang Changzhong <zhangchangzhong@huawei.com>
Fri, 4 Dec 2020 08:48:14 +0000 (16:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2020 12:28:15 +0000 (13:28 +0100)
commitfa5bef34ce8a49be43847a611bf241b03c371bc4
tree2332228afb2ae77d24ee77af1b8e1570c1719ff9
parent2882ad564be88707cdf6942fb48332bad97d1df2
ipv4: fix error return code in rtm_to_fib_config()

[ Upstream commit b410f04eb5b482b5efc4eee90de81ad35d3d923b ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: d15662682db2 ("ipv4: Allow ipv6 gateway with ipv4 routes")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/1607071695-33740-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/fib_frontend.c