Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90633
b: refs/heads/master
c: 3eb84f4
h: refs/heads/master
i:
  90631: 815f769
v: v3
  • Loading branch information
YOSHIFUJI Hideaki committed Apr 12, 2008
1 parent cd7e9ee commit 9a0bffa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 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: fed85383ac34d82e96f227ce49ce68117cec23a0
refs/heads/master: 3eb84f49290461e2b83d6e8ee1f3f0e504340c8b
19 changes: 0 additions & 19 deletions trunk/include/net/addrconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,25 +189,6 @@ static inline void in6_ifa_put(struct inet6_ifaddr *ifp)
#define in6_ifa_hold(ifp) atomic_inc(&(ifp)->refcnt)


/*
* Hash function taken from net_alias.c
*/

static __inline__ u8 ipv6_addr_hash(const struct in6_addr *addr)
{
__u32 word;

/*
* We perform the hash function over the last 64 bits of the address
* This will include the IEEE address token on links that support it.
*/

word = (__force u32)(addr->s6_addr32[2] ^ addr->s6_addr32[3]);
word ^= (word >> 16);
word ^= (word >> 8);

return ((word ^ (word >> 4)) & 0x0f);
}

/*
* compute link-local solicited-node multicast address
Expand Down
19 changes: 19 additions & 0 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,25 @@ ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp)
*ifap = ifp;
}

/*
* Hash function taken from net_alias.c
*/
static u8 ipv6_addr_hash(const struct in6_addr *addr)
{
__u32 word;

/*
* We perform the hash function over the last 64 bits of the address
* This will include the IEEE address token on links that support it.
*/

word = (__force u32)(addr->s6_addr32[2] ^ addr->s6_addr32[3]);
word ^= (word >> 16);
word ^= (word >> 8);

return ((word ^ (word >> 4)) & 0x0f);
}

/* On success it returns ifp with increased reference count */

static struct inet6_ifaddr *
Expand Down

0 comments on commit 9a0bffa

Please sign in to comment.