aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 1cca5761aea..c1e0d63db2e 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -263,6 +263,8 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
263 if (register_netdevice(dev) < 0) 263 if (register_netdevice(dev) < 0)
264 goto failed_free; 264 goto failed_free;
265 265
266 strcpy(nt->parms.name, dev->name);
267
266 dev_hold(dev); 268 dev_hold(dev);
267 269
268 ipip6_tunnel_link(sitn, nt); 270 ipip6_tunnel_link(sitn, nt);
@@ -672,12 +674,15 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
672 if (skb->protocol != htons(ETH_P_IPV6)) 674 if (skb->protocol != htons(ETH_P_IPV6))
673 goto tx_error; 675 goto tx_error;
674 676
677 if (tos == 1)
678 tos = ipv6_get_dsfield(iph6);
679
675 /* ISATAP (RFC4214) - must come before 6to4 */ 680 /* ISATAP (RFC4214) - must come before 6to4 */
676 if (dev->priv_flags & IFF_ISATAP) { 681 if (dev->priv_flags & IFF_ISATAP) {
677 struct neighbour *neigh = NULL; 682 struct neighbour *neigh = NULL;
678 683
679 if (skb_dst(skb)) 684 if (skb_dst(skb))
680 neigh = skb_dst(skb)->neighbour; 685 neigh = dst_get_neighbour(skb_dst(skb));
681 686
682 if (neigh == NULL) { 687 if (neigh == NULL) {
683 if (net_ratelimit()) 688 if (net_ratelimit())
@@ -702,7 +707,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
702 struct neighbour *neigh = NULL; 707 struct neighbour *neigh = NULL;
703 708
704 if (skb_dst(skb)) 709 if (skb_dst(skb))
705 neigh = skb_dst(skb)->neighbour; 710 neigh = dst_get_neighbour(skb_dst(skb));
706 711
707 if (neigh == NULL) { 712 if (neigh == NULL) {
708 if (net_ratelimit()) 713 if (net_ratelimit())
@@ -1141,7 +1146,6 @@ static int ipip6_tunnel_init(struct net_device *dev)
1141 struct ip_tunnel *tunnel = netdev_priv(dev); 1146 struct ip_tunnel *tunnel = netdev_priv(dev);
1142 1147
1143 tunnel->dev = dev; 1148 tunnel->dev = dev;
1144 strcpy(tunnel->parms.name, dev->name);
1145 1149
1146 memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); 1150 memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
1147 memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4); 1151 memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
@@ -1204,6 +1208,7 @@ static void __net_exit sit_destroy_tunnels(struct sit_net *sitn, struct list_hea
1204static int __net_init sit_init_net(struct net *net) 1208static int __net_init sit_init_net(struct net *net)
1205{ 1209{
1206 struct sit_net *sitn = net_generic(net, sit_net_id); 1210 struct sit_net *sitn = net_generic(net, sit_net_id);
1211 struct ip_tunnel *t;
1207 int err; 1212 int err;
1208 1213
1209 sitn->tunnels[0] = sitn->tunnels_wc; 1214 sitn->tunnels[0] = sitn->tunnels_wc;
@@ -1228,6 +1233,9 @@ static int __net_init sit_init_net(struct net *net)
1228 if ((err = register_netdev(sitn->fb_tunnel_dev))) 1233 if ((err = register_netdev(sitn->fb_tunnel_dev)))
1229 goto err_reg_dev; 1234 goto err_reg_dev;
1230 1235
1236 t = netdev_priv(sitn->fb_tunnel_dev);
1237
1238 strcpy(t->parms.name, sitn->fb_tunnel_dev->name);
1231 return 0; 1239 return 0;
1232 1240
1233err_reg_dev: 1241err_reg_dev: