Commit 69320950 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents f0681259 37f06780
......@@ -657,9 +657,7 @@ xfs_iformat_extents(
int nex;
int real_size;
int size;
#if ARCH_CONVERT != ARCH_NOCONVERT
int i;
#endif
ifp = XFS_IFORK_PTR(ip, whichfork);
nex = XFS_DFORK_NEXTENTS_ARCH(dip, whichfork, ARCH_CONVERT);
......
......@@ -2011,7 +2011,7 @@ int ip_mc_sf_allow(struct sock *sk, u32 loc_addr, u32 rmt_addr, int dif)
break;
}
if (!pmc)
return 0;
return 1;
psl = pmc->sflist;
if (!psl)
return pmc->sfmode == MCAST_EXCLUDE;
......@@ -2020,11 +2020,11 @@ int ip_mc_sf_allow(struct sock *sk, u32 loc_addr, u32 rmt_addr, int dif)
if (psl->sl_addr[i] == rmt_addr)
break;
}
if (pmc->sfmode == MCAST_INCLUDE && i < psl->sl_count)
return 1;
if (pmc->sfmode == MCAST_EXCLUDE && i >= psl->sl_count)
return 1;
return 0;
if (pmc->sfmode == MCAST_INCLUDE && i >= psl->sl_count)
return 0;
if (pmc->sfmode == MCAST_EXCLUDE && i < psl->sl_count)
return 0;
return 1;
}
/*
......
......@@ -582,7 +582,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_mc_socklist *mc;
struct ip6_sf_socklist *psl;
int rv = 0;
int rv = 1;
read_lock(&ipv6_sk_mc_lock);
for (mc = np->ipv6_mc_list; mc; mc = mc->next) {
......@@ -591,7 +591,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
}
if (!mc) {
read_unlock(&ipv6_sk_mc_lock);
return 0;
return 1;
}
psl = mc->sflist;
if (!psl) {
......@@ -603,8 +603,10 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
if (ipv6_addr_cmp(&psl->sl_addr[i], src_addr) == 0)
break;
}
rv = (mc->sfmode == MCAST_INCLUDE && i < psl->sl_count);
rv |= (mc->sfmode == MCAST_EXCLUDE && i >= psl->sl_count);
if (mc->sfmode == MCAST_INCLUDE && i >= psl->sl_count);
rv = 0;
if (mc->sfmode == MCAST_EXCLUDE && i < psl->sl_count);
rv = 0;
}
read_unlock(&ipv6_sk_mc_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment