git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
include
/
net
/
addrconf.h
diff --git
a/include/net/addrconf.h
b/include/net/addrconf.h
index
750e250
..
88df8fc
100644
(file)
--- a/
include/net/addrconf.h
+++ b/
include/net/addrconf.h
@@
-35,9
+35,9
@@
struct prefix_info {
#else
#error "Please fix <asm/byteorder.h>"
#endif
#else
#error "Please fix <asm/byteorder.h>"
#endif
- __
u32
valid;
- __
u32
prefered;
- __
u32
reserved2;
+ __
be32
valid;
+ __
be32
prefered;
+ __
be32
reserved2;
struct in6_addr prefix;
};
struct in6_addr prefix;
};
@@
-45,7
+45,6
@@
struct prefix_info {
#ifdef __KERNEL__
#ifdef __KERNEL__
-#include <linux/config.h>
#include <linux/netdevice.h>
#include <net/if_inet6.h>
#include <net/ipv6.h>
#include <linux/netdevice.h>
#include <net/if_inet6.h>
#include <net/ipv6.h>
@@
-62,6
+61,9
@@
extern int addrconf_set_dstaddr(void __user *arg);
extern int ipv6_chk_addr(struct in6_addr *addr,
struct net_device *dev,
int strict);
extern int ipv6_chk_addr(struct in6_addr *addr,
struct net_device *dev,
int strict);
+#ifdef CONFIG_IPV6_MIP6
+extern int ipv6_chk_home_addr(struct in6_addr *addr);
+#endif
extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr,
struct net_device *dev,
int strict);
extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr,
struct net_device *dev,
int strict);
@@
-127,20
+129,18
@@
extern int unregister_inet6addr_notifier(struct notifier_block *nb);
static inline struct inet6_dev *
__in6_dev_get(struct net_device *dev)
{
static inline struct inet6_dev *
__in6_dev_get(struct net_device *dev)
{
- return
(struct inet6_dev *)dev->ip6_ptr
;
+ return
rcu_dereference(dev->ip6_ptr)
;
}
}
-extern rwlock_t addrconf_lock;
-
static inline struct inet6_dev *
in6_dev_get(struct net_device *dev)
{
struct inet6_dev *idev = NULL;
static inline struct inet6_dev *
in6_dev_get(struct net_device *dev)
{
struct inet6_dev *idev = NULL;
- r
ead_lock(&addrconf_lock
);
- idev =
dev->ip6_ptr
;
+ r
cu_read_lock(
);
+ idev =
__in6_dev_get(dev)
;
if (idev)
atomic_inc(&idev->refcnt);
if (idev)
atomic_inc(&idev->refcnt);
- r
ead_unlock(&addrconf_lock
);
+ r
cu_read_unlock(
);
return idev;
}
return idev;
}
@@
-183,7
+183,7
@@
static __inline__ u8 ipv6_addr_hash(const struct in6_addr *addr)
* This will include the IEEE address token on links that support it.
*/
* This will include the IEEE address token on links that support it.
*/
- word =
addr->s6_addr32[2] ^ addr->s6_addr32[3]
;
+ word =
(__force u32)(addr->s6_addr32[2] ^ addr->s6_addr32[3])
;
word ^= (word >> 16);
word ^= (word >> 8);
word ^= (word >> 16);
word ^= (word >> 8);