mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-04 18:27:36 +00:00
vxlan: fix error return code in __vxlan_dev_create()
[ Upstream commit832e09798c] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes:0ce1822c2a("vxlan: add adjacent link to limit depth level") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Link: https://lore.kernel.org/r/1606903122-2098-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b6f2d8c6e3
commit
1f8846e3fd
@@ -3881,8 +3881,10 @@ static int __vxlan_dev_create(struct net *net, struct net_device *dev,
|
|||||||
|
|
||||||
if (dst->remote_ifindex) {
|
if (dst->remote_ifindex) {
|
||||||
remote_dev = __dev_get_by_index(net, dst->remote_ifindex);
|
remote_dev = __dev_get_by_index(net, dst->remote_ifindex);
|
||||||
if (!remote_dev)
|
if (!remote_dev) {
|
||||||
|
err = -ENODEV;
|
||||||
goto errout;
|
goto errout;
|
||||||
|
}
|
||||||
|
|
||||||
err = netdev_upper_dev_link(remote_dev, dev, extack);
|
err = netdev_upper_dev_link(remote_dev, dev, extack);
|
||||||
if (err)
|
if (err)
|
||||||
|
|||||||
Reference in New Issue
Block a user