diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-08 11:49:24 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-08 11:49:24 -0500 |
commit | 9446389ef612096704fdf18fa79bab423d4110f0 (patch) | |
tree | 3e4fda7270be58ae176d20d318e61fb115b325b5 /net/ipv6 | |
parent | cdd0972945dbcb8ea24db365d9b0e100af2a27bb (diff) | |
parent | 84c6f6046c5a2189160a8f0dca8b90427bf690ea (diff) |
Merge commit 'origin' into devel
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/Kconfig | 2 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 3 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 15 | ||||
-rw-r--r-- | net/ipv6/ipcomp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/proc.c | 4 | ||||
-rw-r--r-- | net/ipv6/route.c | 2 | ||||
-rw-r--r-- | net/ipv6/sit.c | 13 | ||||
-rw-r--r-- | net/ipv6/sysctl_net_ipv6.c | 3 |
8 files changed, 30 insertions, 14 deletions
diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig index 3ffb0323668c..58219dfffef8 100644 --- a/net/ipv6/Kconfig +++ b/net/ipv6/Kconfig | |||
@@ -85,7 +85,7 @@ config INET6_ESP | |||
85 | depends on IPV6 | 85 | depends on IPV6 |
86 | select XFRM | 86 | select XFRM |
87 | select CRYPTO | 87 | select CRYPTO |
88 | select CRYPTO_AEAD | 88 | select CRYPTO_AUTHENC |
89 | select CRYPTO_HMAC | 89 | select CRYPTO_HMAC |
90 | select CRYPTO_MD5 | 90 | select CRYPTO_MD5 |
91 | select CRYPTO_CBC | 91 | select CRYPTO_CBC |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e40213db9e4c..101e0e70ba27 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1557,6 +1557,7 @@ addrconf_prefix_route(struct in6_addr *pfx, int plen, struct net_device *dev, | |||
1557 | .fc_expires = expires, | 1557 | .fc_expires = expires, |
1558 | .fc_dst_len = plen, | 1558 | .fc_dst_len = plen, |
1559 | .fc_flags = RTF_UP | flags, | 1559 | .fc_flags = RTF_UP | flags, |
1560 | .fc_nlinfo.nl_net = &init_net, | ||
1560 | }; | 1561 | }; |
1561 | 1562 | ||
1562 | ipv6_addr_copy(&cfg.fc_dst, pfx); | 1563 | ipv6_addr_copy(&cfg.fc_dst, pfx); |
@@ -1583,6 +1584,7 @@ static void addrconf_add_mroute(struct net_device *dev) | |||
1583 | .fc_ifindex = dev->ifindex, | 1584 | .fc_ifindex = dev->ifindex, |
1584 | .fc_dst_len = 8, | 1585 | .fc_dst_len = 8, |
1585 | .fc_flags = RTF_UP, | 1586 | .fc_flags = RTF_UP, |
1587 | .fc_nlinfo.nl_net = &init_net, | ||
1586 | }; | 1588 | }; |
1587 | 1589 | ||
1588 | ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); | 1590 | ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); |
@@ -1599,6 +1601,7 @@ static void sit_route_add(struct net_device *dev) | |||
1599 | .fc_ifindex = dev->ifindex, | 1601 | .fc_ifindex = dev->ifindex, |
1600 | .fc_dst_len = 96, | 1602 | .fc_dst_len = 96, |
1601 | .fc_flags = RTF_UP | RTF_NONEXTHOP, | 1603 | .fc_flags = RTF_UP | RTF_NONEXTHOP, |
1604 | .fc_nlinfo.nl_net = &init_net, | ||
1602 | }; | 1605 | }; |
1603 | 1606 | ||
1604 | /* prefix length - 96 bits "::d.d.d.d" */ | 1607 | /* prefix length - 96 bits "::d.d.d.d" */ |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 2a124e9a1b2d..78f438880923 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -238,17 +238,24 @@ static struct ip6_tnl *ip6_tnl_create(struct ip6_tnl_parm *p) | |||
238 | if (dev == NULL) | 238 | if (dev == NULL) |
239 | goto failed; | 239 | goto failed; |
240 | 240 | ||
241 | if (strchr(name, '%')) { | ||
242 | if (dev_alloc_name(dev, name) < 0) | ||
243 | goto failed_free; | ||
244 | } | ||
245 | |||
241 | t = netdev_priv(dev); | 246 | t = netdev_priv(dev); |
242 | dev->init = ip6_tnl_dev_init; | 247 | dev->init = ip6_tnl_dev_init; |
243 | t->parms = *p; | 248 | t->parms = *p; |
244 | 249 | ||
245 | if ((err = register_netdevice(dev)) < 0) { | 250 | if ((err = register_netdevice(dev)) < 0) |
246 | free_netdev(dev); | 251 | goto failed_free; |
247 | goto failed; | 252 | |
248 | } | ||
249 | dev_hold(dev); | 253 | dev_hold(dev); |
250 | ip6_tnl_link(t); | 254 | ip6_tnl_link(t); |
251 | return t; | 255 | return t; |
256 | |||
257 | failed_free: | ||
258 | free_netdev(dev); | ||
252 | failed: | 259 | failed: |
253 | return NULL; | 260 | return NULL; |
254 | } | 261 | } |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index b90039593a7f..e3dcfa2f436b 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -146,7 +146,9 @@ static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
146 | scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); | 146 | scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); |
147 | tfm = *per_cpu_ptr(ipcd->tfms, cpu); | 147 | tfm = *per_cpu_ptr(ipcd->tfms, cpu); |
148 | 148 | ||
149 | local_bh_disable(); | ||
149 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | 150 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); |
151 | local_bh_enable(); | ||
150 | if (err || (dlen + sizeof(*ipch)) >= plen) { | 152 | if (err || (dlen + sizeof(*ipch)) >= plen) { |
151 | put_cpu(); | 153 | put_cpu(); |
152 | goto out_ok; | 154 | goto out_ok; |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 35e502a72495..199ef379e501 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -217,12 +217,12 @@ int snmp6_register_dev(struct inet6_dev *idev) | |||
217 | if (!proc_net_devsnmp6) | 217 | if (!proc_net_devsnmp6) |
218 | return -ENOENT; | 218 | return -ENOENT; |
219 | 219 | ||
220 | p = create_proc_entry(idev->dev->name, S_IRUGO, proc_net_devsnmp6); | 220 | p = proc_create(idev->dev->name, S_IRUGO, |
221 | proc_net_devsnmp6, &snmp6_seq_fops); | ||
221 | if (!p) | 222 | if (!p) |
222 | return -ENOMEM; | 223 | return -ENOMEM; |
223 | 224 | ||
224 | p->data = idev; | 225 | p->data = idev; |
225 | p->proc_fops = &snmp6_seq_fops; | ||
226 | 226 | ||
227 | idev->stats.proc_dir_entry = p; | 227 | idev->stats.proc_dir_entry = p; |
228 | return 0; | 228 | return 0; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6e7b56ef4449..e8b241cb60bc 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1719,6 +1719,8 @@ static void rtmsg_to_fib6_config(struct in6_rtmsg *rtmsg, | |||
1719 | cfg->fc_src_len = rtmsg->rtmsg_src_len; | 1719 | cfg->fc_src_len = rtmsg->rtmsg_src_len; |
1720 | cfg->fc_flags = rtmsg->rtmsg_flags; | 1720 | cfg->fc_flags = rtmsg->rtmsg_flags; |
1721 | 1721 | ||
1722 | cfg->fc_nlinfo.nl_net = &init_net; | ||
1723 | |||
1722 | ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); | 1724 | ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); |
1723 | ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); | 1725 | ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); |
1724 | ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); | 1726 | ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index dde7801abeff..1656c003b989 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -171,6 +171,11 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
171 | if (dev == NULL) | 171 | if (dev == NULL) |
172 | return NULL; | 172 | return NULL; |
173 | 173 | ||
174 | if (strchr(name, '%')) { | ||
175 | if (dev_alloc_name(dev, name) < 0) | ||
176 | goto failed_free; | ||
177 | } | ||
178 | |||
174 | nt = netdev_priv(dev); | 179 | nt = netdev_priv(dev); |
175 | dev->init = ipip6_tunnel_init; | 180 | dev->init = ipip6_tunnel_init; |
176 | nt->parms = *parms; | 181 | nt->parms = *parms; |
@@ -178,16 +183,16 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
178 | if (parms->i_flags & SIT_ISATAP) | 183 | if (parms->i_flags & SIT_ISATAP) |
179 | dev->priv_flags |= IFF_ISATAP; | 184 | dev->priv_flags |= IFF_ISATAP; |
180 | 185 | ||
181 | if (register_netdevice(dev) < 0) { | 186 | if (register_netdevice(dev) < 0) |
182 | free_netdev(dev); | 187 | goto failed_free; |
183 | goto failed; | ||
184 | } | ||
185 | 188 | ||
186 | dev_hold(dev); | 189 | dev_hold(dev); |
187 | 190 | ||
188 | ipip6_tunnel_link(nt); | 191 | ipip6_tunnel_link(nt); |
189 | return nt; | 192 | return nt; |
190 | 193 | ||
194 | failed_free: | ||
195 | free_netdev(dev); | ||
191 | failed: | 196 | failed: |
192 | return NULL; | 197 | return NULL; |
193 | } | 198 | } |
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 408691b777c2..d6d3e68086f8 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -102,9 +102,6 @@ static int ipv6_sysctl_net_init(struct net *net) | |||
102 | net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, | 102 | net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, |
103 | ipv6_table); | 103 | ipv6_table); |
104 | if (!net->ipv6.sysctl.table) | 104 | if (!net->ipv6.sysctl.table) |
105 | return -ENOMEM; | ||
106 | |||
107 | if (!net->ipv6.sysctl.table) | ||
108 | goto out_ipv6_icmp_table; | 105 | goto out_ipv6_icmp_table; |
109 | 106 | ||
110 | err = 0; | 107 | err = 0; |