Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368151
b: refs/heads/master
c: b7ef213
h: refs/heads/master
i:
  368149: 474b613
  368147: e4b1132
  368143: 3df40c4
v: v3
  • Loading branch information
Hannes Frederic Sowa authored and David S. Miller committed Mar 8, 2013
1 parent 9bdf5fe commit c9b4f22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80580d4b20e13383009b4fb2043235a7d0a42589
refs/heads/master: b7ef213ef65256168df83ddfbb8131ed9adc10f9
12 changes: 12 additions & 0 deletions trunk/include/net/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,18 @@ static inline int ipv6_addr_src_scope(const struct in6_addr *addr)
return __ipv6_addr_src_scope(__ipv6_addr_type(addr));
}

static inline bool __ipv6_addr_needs_scope_id(int type)
{
return type & IPV6_ADDR_LINKLOCAL ||
(type & IPV6_ADDR_MULTICAST &&
(type & (IPV6_ADDR_LOOPBACK|IPV6_ADDR_LINKLOCAL)));
}

static inline __u32 ipv6_iface_scope_id(const struct in6_addr *addr, int iface)
{
return __ipv6_addr_needs_scope_id(__ipv6_addr_type(addr)) ? iface : 0;
}

static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2)
{
return memcmp(a1, a2, sizeof(struct in6_addr));
Expand Down

0 comments on commit c9b4f22

Please sign in to comment.