git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
net
/
ipv4
/
igmp.c
diff --git
a/net/ipv4/igmp.c
b/net/ipv4/igmp.c
index
d1815d3
..
1f31831
100644
(file)
--- a/
net/ipv4/igmp.c
+++ b/
net/ipv4/igmp.c
@@
-143,8
+143,8
@@
static int sf_setstate(struct ip_mc_list *pmc);
static void sf_markstate(struct ip_mc_list *pmc);
#endif
static void ip_mc_clear_src(struct ip_mc_list *pmc);
static void sf_markstate(struct ip_mc_list *pmc);
#endif
static void ip_mc_clear_src(struct ip_mc_list *pmc);
-int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
- int sfcount, __u32 *psfsrc, int delta);
+
static
int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+
int sfcount, __u32 *psfsrc, int delta);
static void ip_ma_put(struct ip_mc_list *im)
{
static void ip_ma_put(struct ip_mc_list *im)
{
@@
-1252,8
+1252,8
@@
void ip_mc_init_dev(struct in_device *in_dev)
in_dev->mr_qrv = IGMP_Unsolicited_Report_Count;
#endif
in_dev->mr_qrv = IGMP_Unsolicited_Report_Count;
#endif
-
in_dev->mc_list_lock = RW_LOCK_UNLOCKED
;
-
in_dev->mc_tomb_lock = SPIN_LOCK_UNLOCKED
;
+
rwlock_init(&in_dev->mc_list_lock)
;
+
spin_lock_init(&in_dev->mc_tomb_lock)
;
}
/* Device going up */
}
/* Device going up */
@@
-1384,8
+1384,8
@@
static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode,
#define igmp_ifc_event(x) do { } while (0)
#endif
#define igmp_ifc_event(x) do { } while (0)
#endif
-int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
- int sfcount, __u32 *psfsrc, int delta)
+
static
int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+
int sfcount, __u32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int changerec = 0;
{
struct ip_mc_list *pmc;
int changerec = 0;
@@
-1520,8
+1520,8
@@
static int sf_setstate(struct ip_mc_list *pmc)
/*
* Add multicast source filter list to the interface list
*/
/*
* Add multicast source filter list to the interface list
*/
-int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
- int sfcount, __u32 *psfsrc, int delta)
+
static
int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+
int sfcount, __u32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int isexclude;
{
struct ip_mc_list *pmc;
int isexclude;
@@
-1617,7
+1617,7
@@
int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
u32 addr = imr->imr_multiaddr.s_addr;
struct ip_mc_socklist *iml, *i;
struct in_device *in_dev;
u32 addr = imr->imr_multiaddr.s_addr;
struct ip_mc_socklist *iml, *i;
struct in_device *in_dev;
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
int count = 0;
if (!MULTICAST(addr))
int count = 0;
if (!MULTICAST(addr))
@@
-1667,8
+1667,8
@@
done:
return err;
}
return err;
}
-int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
- struct in_device *in_dev)
+
static
int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
+
struct in_device *in_dev)
{
int err;
{
int err;
@@
-1691,7
+1691,7
@@
int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
{
int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
{
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_mc_socklist *iml, **imlp;
rtnl_lock();
struct ip_mc_socklist *iml, **imlp;
rtnl_lock();
@@
-1734,7
+1734,7
@@
int ip_mc_source(int add, int omode, struct sock *sk, struct
u32 addr = mreqs->imr_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev = NULL;
u32 addr = mreqs->imr_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev = NULL;
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_sf_socklist *psl;
int i, j, rv;
struct ip_sf_socklist *psl;
int i, j, rv;
@@
-1778,12
+1778,12
@@
int ip_mc_source(int add, int omode, struct sock *sk, struct
goto done;
rv = !0;
for (i=0; i<psl->sl_count; i++) {
goto done;
rv = !0;
for (i=0; i<psl->sl_count; i++) {
- rv = memcmp(&psl->sl_addr
, &mreqs->imr_multi
addr,
+ rv = memcmp(&psl->sl_addr
[i], &mreqs->imr_source
addr,
sizeof(__u32));
sizeof(__u32));
- if (rv
>
= 0)
+ if (rv
=
= 0)
break;
}
break;
}
- if (
!rv)
/* source not found */
+ if (
rv)
/* source not found */
goto done;
/* update the interface filter */
goto done;
/* update the interface filter */
@@
-1825,9
+1825,9
@@
int ip_mc_source(int add, int omode, struct sock *sk, struct
}
rv = 1; /* > 0 for insert logic below if sl_count is 0 */
for (i=0; i<psl->sl_count; i++) {
}
rv = 1; /* > 0 for insert logic below if sl_count is 0 */
for (i=0; i<psl->sl_count; i++) {
- rv = memcmp(&psl->sl_addr
, &mreqs->imr_multi
addr,
+ rv = memcmp(&psl->sl_addr
[i], &mreqs->imr_source
addr,
sizeof(__u32));
sizeof(__u32));
- if (rv
>
= 0)
+ if (rv
=
= 0)
break;
}
if (rv == 0) /* address already there is an error */
break;
}
if (rv == 0) /* address already there is an error */
@@
-1852,7
+1852,7
@@
int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
u32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
u32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_sf_socklist *newpsl, *psl;
if (!MULTICAST(addr))
struct ip_sf_socklist *newpsl, *psl;
if (!MULTICAST(addr))
@@
-1922,7
+1922,7
@@
int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
u32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
u32 addr = msf->imsf_multiaddr;
struct ip_mc_socklist *pmc;
struct in_device *in_dev;
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_sf_socklist *psl;
if (!MULTICAST(addr))
struct ip_sf_socklist *psl;
if (!MULTICAST(addr))
@@
-1980,7
+1980,7
@@
int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
struct sockaddr_in *psin;
u32 addr;
struct ip_mc_socklist *pmc;
struct sockaddr_in *psin;
u32 addr;
struct ip_mc_socklist *pmc;
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_sf_socklist *psl;
psin = (struct sockaddr_in *)&gsf->gf_group;
struct ip_sf_socklist *psl;
psin = (struct sockaddr_in *)&gsf->gf_group;
@@
-2033,7
+2033,7
@@
done:
*/
int ip_mc_sf_allow(struct sock *sk, u32 loc_addr, u32 rmt_addr, int dif)
{
*/
int ip_mc_sf_allow(struct sock *sk, u32 loc_addr, u32 rmt_addr, int dif)
{
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_mc_socklist *pmc;
struct ip_sf_socklist *psl;
int i;
struct ip_mc_socklist *pmc;
struct ip_sf_socklist *psl;
int i;
@@
-2069,7
+2069,7
@@
int ip_mc_sf_allow(struct sock *sk, u32 loc_addr, u32 rmt_addr, int dif)
void ip_mc_drop_socket(struct sock *sk)
{
void ip_mc_drop_socket(struct sock *sk)
{
- struct inet_
opt
*inet = inet_sk(sk);
+ struct inet_
sock
*inet = inet_sk(sk);
struct ip_mc_socklist *iml;
if (inet->mc_list == NULL)
struct ip_mc_socklist *iml;
if (inet->mc_list == NULL)