Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54250805 authored by David Ahern's avatar David Ahern Committed by David S. Miller
Browse files

mlxsw: Fail attempts to use routes with nexthop objects



Fail attempts to use nexthop objects with routes until support can be
properly added.

Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f88d8ea6
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -6122,6 +6122,20 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb,
				NL_SET_ERR_MSG_MOD(info->extack, "IPv6 gateway with IPv4 route is not supported");
				return notifier_from_errno(-EINVAL);
			}
			if (fen_info->fi->nh) {
				NL_SET_ERR_MSG_MOD(info->extack, "IPv4 route with nexthop objects is not supported");
				return notifier_from_errno(-EINVAL);
			}
		} else if (info->family == AF_INET6) {
			struct fib6_entry_notifier_info *fen6_info;

			fen6_info = container_of(info,
						 struct fib6_entry_notifier_info,
						 info);
			if (fen6_info->rt->nh) {
				NL_SET_ERR_MSG_MOD(info->extack, "IPv6 route with nexthop objects is not supported");
				return notifier_from_errno(-EINVAL);
			}
		}
		break;
	}