summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-08-28 20:48:19 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-29 13:07:54 -0700
commit46fa062ad63146dd138ec0f017e71224471e8ea5 (patch)
treef06282d4c2c26f081500e7f2897a2cf6b5c4d3b7 /net/ipv4/route.c
parentf6d3c19274c74ff17174df8078e0a14df003667f (diff)
downloadop-kernel-dev-46fa062ad63146dd138ec0f017e71224471e8ea5.zip
op-kernel-dev-46fa062ad63146dd138ec0f017e71224471e8ea5.tar.gz
ip_tunnels: convert the mode field of ip_tunnel_info to flags
The mode field holds a single bit of information only (whether the ip_tunnel_info struct is for rx or tx). Change the mode field to bit flags. This allows more mode flags to be added. Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 6b91879..5f4a556 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1696,7 +1696,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
*/
tun_info = skb_tunnel_info(skb);
- if (tun_info && tun_info->mode == IP_TUNNEL_INFO_RX)
+ if (tun_info && !(tun_info->mode & IP_TUNNEL_INFO_TX))
fl4.flowi4_tun_key.tun_id = tun_info->key.tun_id;
else
fl4.flowi4_tun_key.tun_id = 0;
OpenPOWER on IntegriCloud