git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
l2tp: initialise PPP sessions before registering them
[pandora-kernel.git]
/
net
/
ipv6
/
sit.c
diff --git
a/net/ipv6/sit.c
b/net/ipv6/sit.c
index
a7a1860
..
1dbd1d1
100644
(file)
--- a/
net/ipv6/sit.c
+++ b/
net/ipv6/sit.c
@@
-182,7
+182,7
@@
static void ipip6_tunnel_unlink(struct sit_net *sitn, struct ip_tunnel *t)
(iter = rtnl_dereference(*tp)) != NULL;
tp = &iter->next) {
if (t == iter) {
(iter = rtnl_dereference(*tp)) != NULL;
tp = &iter->next) {
if (t == iter) {
-
RCU_INIT_POINTER
(*tp, t->next);
+
rcu_assign_pointer
(*tp, t->next);
break;
}
}
break;
}
}
@@
-192,8
+192,8
@@
static void ipip6_tunnel_link(struct sit_net *sitn, struct ip_tunnel *t)
{
struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t);
{
struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t);
-
RCU_INIT_POINTER
(t->next, rtnl_dereference(*tp));
-
RCU_INIT_POINTER
(*tp, t);
+
rcu_assign_pointer
(t->next, rtnl_dereference(*tp));
+
rcu_assign_pointer
(*tp, t);
}
static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn)
}
static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn)
@@
-263,6
+263,8
@@
static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
if (register_netdevice(dev) < 0)
goto failed_free;
if (register_netdevice(dev) < 0)
goto failed_free;
+ strcpy(nt->parms.name, dev->name);
+
dev_hold(dev);
ipip6_tunnel_link(sitn, nt);
dev_hold(dev);
ipip6_tunnel_link(sitn, nt);
@@
-391,7
+393,7
@@
ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
p->addr = a->addr;
p->flags = a->flags;
t->prl_count++;
p->addr = a->addr;
p->flags = a->flags;
t->prl_count++;
-
RCU_INIT_POINTER
(t->prl, p);
+
rcu_assign_pointer
(t->prl, p);
out:
return err;
}
out:
return err;
}
@@
-551,7
+553,7
@@
out:
static inline void ipip6_ecn_decapsulate(const struct iphdr *iph, struct sk_buff *skb)
{
if (INET_ECN_is_ce(iph->tos))
static inline void ipip6_ecn_decapsulate(const struct iphdr *iph, struct sk_buff *skb)
{
if (INET_ECN_is_ce(iph->tos))
- IP6_ECN_set_ce(ipv6_hdr(skb));
+ IP6_ECN_set_ce(
skb,
ipv6_hdr(skb));
}
static int ipip6_rcv(struct sk_buff *skb)
}
static int ipip6_rcv(struct sk_buff *skb)
@@
-1144,7
+1146,6
@@
static int ipip6_tunnel_init(struct net_device *dev)
struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel->dev = dev;
struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel->dev = dev;
- strcpy(tunnel->parms.name, dev->name);
memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
@@
-1176,7
+1177,7
@@
static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
if (!dev->tstats)
return -ENOMEM;
dev_hold(dev);
if (!dev->tstats)
return -ENOMEM;
dev_hold(dev);
-
RCU_INIT_POINTER
(sitn->tunnels_wc[0], tunnel);
+
rcu_assign_pointer
(sitn->tunnels_wc[0], tunnel);
return 0;
}
return 0;
}
@@
-1207,6
+1208,7
@@
static void __net_exit sit_destroy_tunnels(struct sit_net *sitn, struct list_hea
static int __net_init sit_init_net(struct net *net)
{
struct sit_net *sitn = net_generic(net, sit_net_id);
static int __net_init sit_init_net(struct net *net)
{
struct sit_net *sitn = net_generic(net, sit_net_id);
+ struct ip_tunnel *t;
int err;
sitn->tunnels[0] = sitn->tunnels_wc;
int err;
sitn->tunnels[0] = sitn->tunnels_wc;
@@
-1231,6
+1233,9
@@
static int __net_init sit_init_net(struct net *net)
if ((err = register_netdev(sitn->fb_tunnel_dev)))
goto err_reg_dev;
if ((err = register_netdev(sitn->fb_tunnel_dev)))
goto err_reg_dev;
+ t = netdev_priv(sitn->fb_tunnel_dev);
+
+ strcpy(t->parms.name, sitn->fb_tunnel_dev->name);
return 0;
err_reg_dev:
return 0;
err_reg_dev:
@@
-1288,4
+1293,5
@@
static int __init sit_init(void)
module_init(sit_init);
module_exit(sit_cleanup);
MODULE_LICENSE("GPL");
module_init(sit_init);
module_exit(sit_cleanup);
MODULE_LICENSE("GPL");
+MODULE_ALIAS_RTNL_LINK("sit");
MODULE_ALIAS_NETDEV("sit0");
MODULE_ALIAS_NETDEV("sit0");