Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351378
b: refs/heads/master
c: a04d40b
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 14, 2013
1 parent 953824b commit c3363fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: e287656b365f8db4486371c76ea54cbdbed7129c
refs/heads/master: a04d40b8956010d2a6a7abc9254792c8f8649242
9 changes: 7 additions & 2 deletions trunk/include/net/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,13 @@ static inline bool ipv6_addr_loopback(const struct in6_addr *a)

static inline bool ipv6_addr_v4mapped(const struct in6_addr *a)
{
return (a->s6_addr32[0] | a->s6_addr32[1] |
(a->s6_addr32[2] ^ htonl(0x0000ffff))) == 0;
return (
#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64
*(__be64 *)a |
#else
(a->s6_addr32[0] | a->s6_addr32[1]) |
#endif
(a->s6_addr32[2] ^ htonl(0x0000ffff))) == 0UL;
}

/*
Expand Down

0 comments on commit c3363fd

Please sign in to comment.