Merge tag 'gpio-updates-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / net / ipv4 / fib_frontend.c
index bfb345c..a933bd6 100644 (file)
@@ -371,6 +371,8 @@ static int __fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
                fl4.flowi4_proto = 0;
                fl4.fl4_sport = 0;
                fl4.fl4_dport = 0;
+       } else {
+               swap(fl4.fl4_sport, fl4.fl4_dport);
        }
 
        if (fib_lookup(net, &fl4, &res, 0))
@@ -1514,6 +1516,12 @@ static int __net_init ip_fib_net_init(struct net *net)
        if (err)
                return err;
 
+#ifdef CONFIG_IP_ROUTE_MULTIPATH
+       /* Default to 3-tuple */
+       net->ipv4.sysctl_fib_multipath_hash_fields =
+               FIB_MULTIPATH_HASH_FIELD_DEFAULT_MASK;
+#endif
+
        /* Avoid false sharing : Use at least a full cache line */
        size = max_t(size_t, size, L1_CACHE_BYTES);