aboutsummaryrefslogtreecommitdiffstats
path: root/net/mpls/mpls_iptunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mpls/mpls_iptunnel.c')
-rw-r--r--net/mpls/mpls_iptunnel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mpls/mpls_iptunnel.c b/net/mpls/mpls_iptunnel.c
index 67591aef9cae..64afd3d0b144 100644
--- a/net/mpls/mpls_iptunnel.c
+++ b/net/mpls/mpls_iptunnel.c
@@ -54,10 +54,10 @@ int mpls_output(struct net *net, struct sock *sk, struct sk_buff *skb)
54 unsigned int ttl; 54 unsigned int ttl;
55 55
56 /* Obtain the ttl */ 56 /* Obtain the ttl */
57 if (skb->protocol == htons(ETH_P_IP)) { 57 if (dst->ops->family == AF_INET) {
58 ttl = ip_hdr(skb)->ttl; 58 ttl = ip_hdr(skb)->ttl;
59 rt = (struct rtable *)dst; 59 rt = (struct rtable *)dst;
60 } else if (skb->protocol == htons(ETH_P_IPV6)) { 60 } else if (dst->ops->family == AF_INET6) {
61 ttl = ipv6_hdr(skb)->hop_limit; 61 ttl = ipv6_hdr(skb)->hop_limit;
62 rt6 = (struct rt6_info *)dst; 62 rt6 = (struct rt6_info *)dst;
63 } else { 63 } else {