net: fix saving TX flow hash in sock for outgoing connections
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / fib_semantics.c
index 5b6efb3d2308b0b40b22da7274ad611c4f3d0158..f99f41bd15b83072d7a67cd452a29ce550e0593e 100644 (file)
@@ -537,7 +537,7 @@ int fib_nh_match(struct fib_config *cfg, struct fib_info *fi)
                        return 1;
 
                attrlen = rtnh_attrlen(rtnh);
-               if (attrlen < 0) {
+               if (attrlen > 0) {
                        struct nlattr *nla, *attrs = rtnh_attrs(rtnh);
 
                        nla = nla_find(attrs, attrlen, RTA_GATEWAY);