mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
af_mpls: add null dev check in find_outdev
This patch adds null dev check for the 'cfg->rc_via_table == NEIGH_LINK_TABLE or dev_get_by_index() failed' case Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Roopa Prabhu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3c62181840
commit
3dcb615e68
1 changed files with 3 additions and 0 deletions
|
|
@ -411,6 +411,9 @@ static struct net_device *find_outdev(struct net *net,
|
|||
dev = dev_get_by_index(net, cfg->rc_ifindex);
|
||||
}
|
||||
|
||||
if (!dev)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue