mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 05:42:36 +00:00
vxlan: fix dereference of nexthop group in nexthop update path
fix dereference of nexthop group in fdb nexthop group
update validation path.
Fixes: 1274e1cc42
("vxlan: ecmp support for mac fdb entries")
Reported-by: Ido Schimmel <idosch@idosch.org>
Suggested-by: Ido Schimmel <idosch@idosch.org>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
547ce4cfb3
commit
03eaeda780
1 changed files with 2 additions and 2 deletions
|
@ -881,13 +881,13 @@ static int vxlan_fdb_nh_update(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb,
|
||||||
goto err_inval;
|
goto err_inval;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nh->is_group || !nh->nh_grp->mpath) {
|
nhg = rtnl_dereference(nh->nh_grp);
|
||||||
|
if (!nh->is_group || !nhg->mpath) {
|
||||||
NL_SET_ERR_MSG(extack, "Nexthop is not a multipath group");
|
NL_SET_ERR_MSG(extack, "Nexthop is not a multipath group");
|
||||||
goto err_inval;
|
goto err_inval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check nexthop group family */
|
/* check nexthop group family */
|
||||||
nhg = rtnl_dereference(nh->nh_grp);
|
|
||||||
switch (vxlan->default_dst.remote_ip.sa.sa_family) {
|
switch (vxlan->default_dst.remote_ip.sa.sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
if (!nhg->has_v4) {
|
if (!nhg->has_v4) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue