Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361840
b: refs/heads/master
c: a79ca22
h: refs/heads/master
v: v3
  • Loading branch information
Hong Zhiguo authored and David S. Miller committed Mar 25, 2013
1 parent 27a41d4 commit f4ed279
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: ded34e0fe8fe8c2d595bfa30626654e4b87621e0
refs/heads/master: a79ca223e029aa4f09abb337accf1812c900a800
26 changes: 10 additions & 16 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4784,26 +4784,20 @@ static void addrconf_sysctl_unregister(struct inet6_dev *idev)

static int __net_init addrconf_init_net(struct net *net)
{
int err;
int err = -ENOMEM;
struct ipv6_devconf *all, *dflt;

err = -ENOMEM;
all = &ipv6_devconf;
dflt = &ipv6_devconf_dflt;
all = kmemdup(&ipv6_devconf, sizeof(ipv6_devconf), GFP_KERNEL);
if (all == NULL)
goto err_alloc_all;

if (!net_eq(net, &init_net)) {
all = kmemdup(all, sizeof(ipv6_devconf), GFP_KERNEL);
if (all == NULL)
goto err_alloc_all;
dflt = kmemdup(&ipv6_devconf_dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL);
if (dflt == NULL)
goto err_alloc_dflt;

dflt = kmemdup(dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL);
if (dflt == NULL)
goto err_alloc_dflt;
} else {
/* these will be inherited by all namespaces */
dflt->autoconf = ipv6_defaults.autoconf;
dflt->disable_ipv6 = ipv6_defaults.disable_ipv6;
}
/* these will be inherited by all namespaces */
dflt->autoconf = ipv6_defaults.autoconf;
dflt->disable_ipv6 = ipv6_defaults.disable_ipv6;

net->ipv6.devconf_all = all;
net->ipv6.devconf_dflt = dflt;
Expand Down

0 comments on commit f4ed279

Please sign in to comment.