rocker: Fail attempts to use routes with nexthop objects
authorDavid Ahern <dsahern@gmail.com>
Tue, 4 Jun 2019 03:19:55 +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/rocker/rocker_main.c

index 7ae6c124bfe92ae360d754cf679ef4a166aa374d..45b3325c3a384b51cd752de7b8e0d430a002d326 100644 (file)
@@ -2214,6 +2214,10 @@ static int rocker_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);
+                       }
                }
 
                memcpy(&fib_work->fen_info, ptr, sizeof(fib_work->fen_info));