diff options
| -rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d72bcd8cffbd..4c5142a30808 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -5043,6 +5043,12 @@ static int ip6_route_multipath_add(struct fib6_config *cfg, | |||
| 5043 | rtnh = rtnh_next(rtnh, &remaining); | 5043 | rtnh = rtnh_next(rtnh, &remaining); |
| 5044 | } | 5044 | } |
| 5045 | 5045 | ||
| 5046 | if (list_empty(&rt6_nh_list)) { | ||
| 5047 | NL_SET_ERR_MSG(extack, | ||
| 5048 | "Invalid nexthop configuration - no valid nexthops"); | ||
| 5049 | return -EINVAL; | ||
| 5050 | } | ||
| 5051 | |||
| 5046 | /* for add and replace send one notification with all nexthops. | 5052 | /* for add and replace send one notification with all nexthops. |
| 5047 | * Skip the notification in fib6_add_rt2node and send one with | 5053 | * Skip the notification in fib6_add_rt2node and send one with |
| 5048 | * the full route when done | 5054 | * the full route when done |
