mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Acked-by: Thomas Graf <[email protected]> Acked-by: Pravin B Shelar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
f6d3c19274
commit
46fa062ad6
7 changed files with 7 additions and 13 deletions
|
|
@ -511,7 +511,7 @@ static void gre_fb_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
int err;
|
||||
|
||||
tun_info = skb_tunnel_info(skb);
|
||||
if (unlikely(!tun_info || tun_info->mode != IP_TUNNEL_INFO_TX))
|
||||
if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX)))
|
||||
goto err_free_skb;
|
||||
|
||||
key = &tun_info->key;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue