aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_semantics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 5b6efb3d2308..f99f41bd15b8 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -537,7 +537,7 @@ int fib_nh_match(struct fib_config *cfg, struct fib_info *fi)
537 return 1; 537 return 1;
538 538
539 attrlen = rtnh_attrlen(rtnh); 539 attrlen = rtnh_attrlen(rtnh);
540 if (attrlen < 0) { 540 if (attrlen > 0) {
541 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); 541 struct nlattr *nla, *attrs = rtnh_attrs(rtnh);
542 542
543 nla = nla_find(attrs, attrlen, RTA_GATEWAY); 543 nla = nla_find(attrs, attrlen, RTA_GATEWAY);