addrconf.c (e0da5a480cafc7ca228d6b5a05dbd77344a6bd29) | addrconf.c (441fc2a2393a9b9ffbacb97f4427cce743579411) |
---|---|
1/* 2 * IPv6 Address [auto]configuration 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 8 * --- 320 unchanged lines hidden (view full) --- 329 330 ndev = kzalloc(sizeof(struct inet6_dev), GFP_KERNEL); 331 332 if (ndev == NULL) 333 return NULL; 334 335 rwlock_init(&ndev->lock); 336 ndev->dev = dev; | 1/* 2 * IPv6 Address [auto]configuration 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 8 * --- 320 unchanged lines hidden (view full) --- 329 330 ndev = kzalloc(sizeof(struct inet6_dev), GFP_KERNEL); 331 332 if (ndev == NULL) 333 return NULL; 334 335 rwlock_init(&ndev->lock); 336 ndev->dev = dev; |
337 memcpy(&ndev->cnf, &ipv6_devconf_dflt, sizeof(ndev->cnf)); | 337 memcpy(&ndev->cnf, dev->nd_net->ipv6.devconf_dflt, sizeof(ndev->cnf)); |
338 ndev->cnf.mtu6 = dev->mtu; 339 ndev->cnf.sysctl = NULL; 340 ndev->nd_parms = neigh_parms_alloc(dev, &nd_tbl); 341 if (ndev->nd_parms == NULL) { 342 kfree(ndev); 343 return NULL; 344 } 345 /* We refer to the device */ --- 130 unchanged lines hidden (view full) --- 476 read_unlock(&dev_base_lock); 477} 478 479static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) 480{ 481 struct net *net; 482 483 net = (struct net *)table->extra2; | 338 ndev->cnf.mtu6 = dev->mtu; 339 ndev->cnf.sysctl = NULL; 340 ndev->nd_parms = neigh_parms_alloc(dev, &nd_tbl); 341 if (ndev->nd_parms == NULL) { 342 kfree(ndev); 343 return NULL; 344 } 345 /* We refer to the device */ --- 130 unchanged lines hidden (view full) --- 476 read_unlock(&dev_base_lock); 477} 478 479static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) 480{ 481 struct net *net; 482 483 net = (struct net *)table->extra2; |
484 if (p == &ipv6_devconf_dflt.forwarding) | 484 if (p == &net->ipv6.devconf_dflt->forwarding) |
485 return; 486 487 if (p == &ipv6_devconf.forwarding) { | 485 return; 486 487 if (p == &ipv6_devconf.forwarding) { |
488 ipv6_devconf_dflt.forwarding = ipv6_devconf.forwarding; | 488 net->ipv6.devconf_dflt->forwarding = ipv6_devconf.forwarding; |
489 addrconf_forward_change(net); 490 } else if ((!*p) ^ (!old)) 491 dev_forward_change((struct inet6_dev *)table->extra1); 492 493 if (*p) 494 rt6_purge_dflt_routers(); 495} 496#endif --- 3845 unchanged lines hidden --- | 489 addrconf_forward_change(net); 490 } else if ((!*p) ^ (!old)) 491 dev_forward_change((struct inet6_dev *)table->extra1); 492 493 if (*p) 494 rt6_purge_dflt_routers(); 495} 496#endif --- 3845 unchanged lines hidden --- |