Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3c79d64d
Commit
3c79d64d
authored
Jun 26, 2003
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/torvalds/linux-2.5
into osdl.org:/home/jmorris/bk/net/work-2.5
parents
1d8c1ffb
0c12c24b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
net/ipv4/igmp.c
net/ipv4/igmp.c
+18
-12
No files found.
net/ipv4/igmp.c
View file @
3c79d64d
...
...
@@ -757,9 +757,10 @@ static void igmp_heard_report(struct in_device *in_dev, u32 group)
read_unlock
(
&
in_dev
->
lock
);
}
static
void
igmp_heard_query
(
struct
in_device
*
in_dev
,
struct
igmphdr
*
ih
,
static
void
igmp_heard_query
(
struct
in_device
*
in_dev
,
struct
sk_buff
*
skb
,
int
len
)
{
struct
igmphdr
*
ih
=
skb
->
h
.
igmph
;
struct
igmpv3_query
*
ih3
=
(
struct
igmpv3_query
*
)
ih
;
struct
ip_mc_list
*
im
;
u32
group
=
ih
->
group
;
...
...
@@ -790,6 +791,17 @@ static void igmp_heard_query(struct in_device *in_dev, struct igmphdr *ih,
}
else
if
(
len
<
12
)
{
return
;
/* ignore bogus packet; freed by caller */
}
else
{
/* v3 */
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
igmpv3_query
)))
return
;
ih3
=
(
struct
igmpv3_query
*
)
skb
->
h
.
raw
;
if
(
ih3
->
nsrcs
)
{
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
igmpv3_query
)
+
ntohs
(
ih3
->
nsrcs
)
*
sizeof
(
__u32
)))
return
;
ih3
=
(
struct
igmpv3_query
*
)
skb
->
h
.
raw
;
}
max_delay
=
IGMPV3_MRC
(
ih3
->
code
)
*
(
HZ
/
IGMP_TIMER_SCALE
);
if
(
!
max_delay
)
max_delay
=
1
;
/* can't mod w/ 0 */
...
...
@@ -838,7 +850,7 @@ static void igmp_heard_query(struct in_device *in_dev, struct igmphdr *ih,
int
igmp_rcv
(
struct
sk_buff
*
skb
)
{
/* This basically follows the spec line by line -- see RFC1112 */
struct
igmphdr
*
ih
=
skb
->
h
.
igmph
;
struct
igmphdr
*
ih
;
struct
in_device
*
in_dev
=
in_dev_get
(
skb
->
dev
);
int
len
=
skb
->
len
;
...
...
@@ -847,23 +859,17 @@ int igmp_rcv(struct sk_buff *skb)
return
0
;
}
if
(
skb_is_nonlinear
(
skb
))
{
if
(
skb_linearize
(
skb
,
GFP_ATOMIC
)
!=
0
)
{
kfree_skb
(
skb
);
return
-
ENOMEM
;
}
ih
=
skb
->
h
.
igmph
;
}
if
(
len
<
sizeof
(
struct
igmphdr
)
||
ip_compute_csum
((
void
*
)
ih
,
len
))
{
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
igmphdr
))
||
(
u16
)
csum_fold
(
skb_checksum
(
skb
,
0
,
len
,
0
)))
{
in_dev_put
(
in_dev
);
kfree_skb
(
skb
);
return
0
;
}
ih
=
skb
->
h
.
igmph
;
switch
(
ih
->
type
)
{
case
IGMP_HOST_MEMBERSHIP_QUERY
:
igmp_heard_query
(
in_dev
,
ih
,
len
);
igmp_heard_query
(
in_dev
,
skb
,
len
);
break
;
case
IGMP_HOST_MEMBERSHIP_REPORT
:
case
IGMPV2_HOST_MEMBERSHIP_REPORT
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment