Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214802
b: refs/heads/master
c: dd4080e
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 29, 2010
1 parent 1aff9a9 commit 85a5da0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fada5636fe41fd1423fe4e6af7b9f609378acde6
refs/heads/master: dd4080ee575db1a2d0f40538aed5aa7662a06c54
14 changes: 11 additions & 3 deletions trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
return 0;
}

static void __net_init ipip6_fb_tunnel_init(struct net_device *dev)
static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
struct iphdr *iph = &tunnel->parms.iph;
Expand All @@ -1175,8 +1175,12 @@ static void __net_init ipip6_fb_tunnel_init(struct net_device *dev)
iph->ihl = 5;
iph->ttl = 64;

dev->tstats = alloc_percpu(struct pcpu_tstats);
if (!dev->tstats)
return -ENOMEM;
dev_hold(dev);
sitn->tunnels_wc[0] = tunnel;
return 0;
}

static struct xfrm_tunnel sit_handler __read_mostly = {
Expand Down Expand Up @@ -1220,7 +1224,10 @@ static int __net_init sit_init_net(struct net *net)
}
dev_net_set(sitn->fb_tunnel_dev, net);

ipip6_fb_tunnel_init(sitn->fb_tunnel_dev);
err = ipip6_fb_tunnel_init(sitn->fb_tunnel_dev);
if (err)
goto err_dev_free;

ipip6_tunnel_clone_6rd(sitn->fb_tunnel_dev, sitn);

if ((err = register_netdev(sitn->fb_tunnel_dev)))
Expand All @@ -1230,7 +1237,8 @@ static int __net_init sit_init_net(struct net *net)

err_reg_dev:
dev_put(sitn->fb_tunnel_dev);
free_netdev(sitn->fb_tunnel_dev);
err_dev_free:
ipip6_dev_free(sitn->fb_tunnel_dev);
err_alloc_dev:
return err;
}
Expand Down

0 comments on commit 85a5da0

Please sign in to comment.