summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ethtool.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ethtool.c b/ethtool.c
index 2e04d87..34fe107 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3170,10 +3170,13 @@ static int do_srxntuple(int fd, struct ifreq *ifr)
* supported. It is possible that the interface uses the network
* flow classifier interface instead of N-tuple.
*/
- if (err && errno != EOPNOTSUPP)
- perror("Cannot add new rule via N-tuple");
+ if (err < 0) {
+ if (errno != EOPNOTSUPP)
+ perror("Cannot add new rule via N-tuple");
+ return -1;
+ }
- return err;
+ return 0;
}
static int do_srxclsrule(int fd, struct ifreq *ifr)