]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mlx5: Fail attempts to use routes with nexthop objects
authorDavid Ahern <dsahern@gmail.com>
Tue, 4 Jun 2019 03:19:54 +0000 (20:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2019 02:26:50 +0000 (19:26 -0700)
Fail attempts to use nexthop objects with routes until support can be
properly added.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c

index 2cbfaa8da7fc32d0749e52d5be69c0587946b4ed..e697663939903562e876baeb008efc491b8f4371 100644 (file)
@@ -262,6 +262,10 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
                fen_info = container_of(info, struct fib_entry_notifier_info,
                                        info);
                fi = fen_info->fi;
+               if (fi->nh) {
+                       NL_SET_ERR_MSG_MOD(info->extack, "IPv4 route with nexthop objects is not supported");
+                       return notifier_from_errno(-EINVAL);
+               }
                fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
                if (fib_dev != ldev->pf[0].netdev &&
                    fib_dev != ldev->pf[1].netdev) {