diff options
| author | David S. Miller <davem@davemloft.net> | 2013-03-27 13:52:49 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-03-27 13:52:49 -0400 |
| commit | e2a553dbf18a5177fdebe29495c32a8e7fd3a4db (patch) | |
| tree | 5ccb3d498325a7aaf93f49549eca03cb7861ca1c /net/ipv6 | |
| parent | 7559d97993ae7d552c96313155286f372cf4cf7c (diff) | |
| parent | a8c45289f215e137825bf9630d0abb41c1dc41ff (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
include/net/ipip.h
The changes made to ipip.h in 'net' were already included
in 'net-next' before that header was moved to another location.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/addrconf.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 78d8414d2cf4..d6279cb3d547 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -4876,26 +4876,20 @@ static void addrconf_sysctl_unregister(struct inet6_dev *idev) | |||
| 4876 | 4876 | ||
| 4877 | static int __net_init addrconf_init_net(struct net *net) | 4877 | static int __net_init addrconf_init_net(struct net *net) |
| 4878 | { | 4878 | { |
| 4879 | int err; | 4879 | int err = -ENOMEM; |
| 4880 | struct ipv6_devconf *all, *dflt; | 4880 | struct ipv6_devconf *all, *dflt; |
| 4881 | 4881 | ||
| 4882 | err = -ENOMEM; | 4882 | all = kmemdup(&ipv6_devconf, sizeof(ipv6_devconf), GFP_KERNEL); |
| 4883 | all = &ipv6_devconf; | 4883 | if (all == NULL) |
| 4884 | dflt = &ipv6_devconf_dflt; | 4884 | goto err_alloc_all; |
| 4885 | 4885 | ||
| 4886 | if (!net_eq(net, &init_net)) { | 4886 | dflt = kmemdup(&ipv6_devconf_dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL); |
| 4887 | all = kmemdup(all, sizeof(ipv6_devconf), GFP_KERNEL); | 4887 | if (dflt == NULL) |
| 4888 | if (all == NULL) | 4888 | goto err_alloc_dflt; |
| 4889 | goto err_alloc_all; | ||
| 4890 | 4889 | ||
| 4891 | dflt = kmemdup(dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL); | 4890 | /* these will be inherited by all namespaces */ |
| 4892 | if (dflt == NULL) | 4891 | dflt->autoconf = ipv6_defaults.autoconf; |
| 4893 | goto err_alloc_dflt; | 4892 | dflt->disable_ipv6 = ipv6_defaults.disable_ipv6; |
| 4894 | } else { | ||
| 4895 | /* these will be inherited by all namespaces */ | ||
| 4896 | dflt->autoconf = ipv6_defaults.autoconf; | ||
| 4897 | dflt->disable_ipv6 = ipv6_defaults.disable_ipv6; | ||
| 4898 | } | ||
| 4899 | 4893 | ||
| 4900 | net->ipv6.devconf_all = all; | 4894 | net->ipv6.devconf_all = all; |
| 4901 | net->ipv6.devconf_dflt = dflt; | 4895 | net->ipv6.devconf_dflt = dflt; |
