ip_tunnels: use tos and ttl fields also for IPv6
authorJiri Benc <jbenc@redhat.com>
Thu, 20 Aug 2015 11:56:24 +0000 (13:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Aug 2015 22:42:36 +0000 (15:42 -0700)
Rename the ipv4_tos and ipv4_ttl fields to just 'tos' and 'ttl', as they'll
be used with IPv6 tunnels, too.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c
include/net/ip_tunnels.h
net/ipv4/ip_gre.c
net/ipv4/ip_tunnel_core.c
net/openvswitch/flow_netlink.c
net/openvswitch/vport-geneve.c
net/openvswitch/vport.c
net/openvswitch/vport.h

index 30a7abc..ebeb3de 100644 (file)
@@ -1278,8 +1278,8 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
                info = &tun_dst->u.tun_info;
                info->key.u.ipv4.src = iph->saddr;
                info->key.u.ipv4.dst = iph->daddr;
-               info->key.ipv4_tos = iph->tos;
-               info->key.ipv4_ttl = iph->ttl;
+               info->key.tos = iph->tos;
+               info->key.ttl = iph->ttl;
                info->key.tp_src = udp_hdr(skb)->source;
                info->key.tp_dst = udp_hdr(skb)->dest;
 
@@ -1960,8 +1960,8 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
                        else
                                flags &= ~VXLAN_F_UDP_CSUM;
 
-                       ttl = info->key.ipv4_ttl;
-                       tos = info->key.ipv4_tos;
+                       ttl = info->key.ttl;
+                       tos = info->key.tos;
 
                        if (info->options_len)
                                md = ip_tunnel_info_opts(info, sizeof(*md));
index 6a51371..224e4ec 100644 (file)
@@ -44,8 +44,8 @@ struct ip_tunnel_key {
                } ipv6;
        } u;
        __be16                  tun_flags;
-       u8                      ipv4_tos;
-       u8                      ipv4_ttl;
+       u8                      tos;            /* TOS for IPv4, TC for IPv6 */
+       u8                      ttl;            /* TTL for IPv4, HL for IPv6 */
        __be16                  tp_src;
        __be16                  tp_dst;
 };
@@ -195,8 +195,8 @@ static inline void __ip_tunnel_info_init(struct ip_tunnel_info *tun_info,
        tun_info->key.u.ipv4.dst = daddr;
        memset((unsigned char *)&tun_info->key + IP_TUNNEL_KEY_IPV4_PAD,
               0, IP_TUNNEL_KEY_IPV4_PAD_LEN);
-       tun_info->key.ipv4_tos = tos;
-       tun_info->key.ipv4_ttl = ttl;
+       tun_info->key.tos = tos;
+       tun_info->key.ttl = ttl;
        tun_info->key.tun_flags = tun_flags;
 
        /* For the tunnel types on the top of IPsec, the tp_src and tp_dst of
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge