Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- net/sched/cls_route.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ net/sched/cls_route.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
-@@ -431,6 +431,11 @@ static int route4_set_parms(struct net *
+@@ -431,6 +431,9 @@ static int route4_set_parms(struct net *
return -EINVAL;
}
-+ if (!nhandle) {
-+ NL_SET_ERR_MSG(extack, "Replacing with handle of 0 is invalid");
++ if (!nhandle)
+ return -EINVAL;
-+ }
+
h1 = to_hash(nhandle);
b = rtnl_dereference(head->table[h1]);
if (!b) {
-@@ -483,6 +488,11 @@ static int route4_change(struct net *net
+@@ -483,6 +486,9 @@ static int route4_change(struct net *net
int err;
bool new = true;
-+ if (!handle) {
-+ NL_SET_ERR_MSG(extack, "Creating with handle of 0 is invalid");
++ if (!handle)
+ return -EINVAL;
-+ }
+
if (opt == NULL)
return handle ? -EINVAL : 0;
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- net/sched/cls_route.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ net/sched/cls_route.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
-@@ -427,6 +427,11 @@ static int route4_set_parms(struct net *
+@@ -427,6 +427,9 @@ static int route4_set_parms(struct net *
goto errout;
}
-+ if (!nhandle) {
-+ NL_SET_ERR_MSG(extack, "Replacing with handle of 0 is invalid");
++ if (!nhandle)
+ return -EINVAL;
-+ }
+
h1 = to_hash(nhandle);
b = rtnl_dereference(head->table[h1]);
if (!b) {
-@@ -486,6 +491,11 @@ static int route4_change(struct net *net
+@@ -486,6 +489,9 @@ static int route4_change(struct net *net
int err;
bool new = true;
-+ if (!handle) {
-+ NL_SET_ERR_MSG(extack, "Creating with handle of 0 is invalid");
++ if (!handle)
+ return -EINVAL;
-+ }
+
if (opt == NULL)
return handle ? -EINVAL : 0;