Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78766
b: refs/heads/master
c: 389f661
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Lezcano authored and David S. Miller committed Jan 28, 2008
1 parent f20540a commit f5b8245
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 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: 1cab3da6be6c7659f62d0d297b389cc0e48b2178
refs/heads/master: 389f661224cdbdf178553fb09a52dc6c8bf86890
3 changes: 2 additions & 1 deletion trunk/include/net/addrconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ extern int ipv6_chk_addr(struct net *net,
int strict);

#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
extern int ipv6_chk_home_addr(struct in6_addr *addr);
extern int ipv6_chk_home_addr(struct net *net,
struct in6_addr *addr);
#endif
extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
struct in6_addr *addr,
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2883,13 +2883,15 @@ void if6_proc_exit(void)

#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
/* Check if address is a home address configured on any interface. */
int ipv6_chk_home_addr(struct in6_addr *addr)
int ipv6_chk_home_addr(struct net *net, struct in6_addr *addr)
{
int ret = 0;
struct inet6_ifaddr * ifp;
u8 hash = ipv6_addr_hash(addr);
read_lock_bh(&addrconf_hash_lock);
for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) {
if (ifp->idev->dev->nd_net != net)
continue;
if (ipv6_addr_cmp(&ifp->addr, addr) == 0 &&
(ifp->flags & IFA_F_HOMEADDRESS)) {
ret = 1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb)
kfree_skb(skb);
return -1;
}
if (!ipv6_chk_home_addr(addr)) {
if (!ipv6_chk_home_addr(&init_net, addr)) {
IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
IPSTATS_MIB_INADDRERRORS);
kfree_skb(skb);
Expand Down

0 comments on commit f5b8245

Please sign in to comment.