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
Kirill Smelkov
linux
Commits
c87ec979
Commit
c87ec979
authored
Jun 16, 2003
by
David Stevens
Committed by
David S. Miller
Jun 16, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4/IPV6]: Make sure SKB has enough space while building IGMP/MLD packets.
parent
8d61ab5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
net/ipv4/igmp.c
net/ipv4/igmp.c
+10
-1
net/ipv6/mcast.c
net/ipv6/mcast.c
+10
-1
No files found.
net/ipv4/igmp.c
View file @
c87ec979
...
...
@@ -387,8 +387,17 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
if
(
type
==
IGMPV3_ALLOW_NEW_SOURCES
||
type
==
IGMPV3_BLOCK_OLD_SOURCES
)
return
skb
;
if
(
pmc
->
crcount
||
isquery
)
if
(
pmc
->
crcount
||
isquery
)
{
/* make sure we have room for group header and at
* least one source.
*/
if
(
skb
&&
AVAILABLE
(
skb
)
<
sizeof
(
struct
igmpv3_grec
)
+
sizeof
(
__u32
))
{
igmpv3_sendpack
(
skb
);
skb
=
0
;
/* add_grhead will get a new one */
}
skb
=
add_grhead
(
skb
,
pmc
,
type
,
&
pgr
);
}
return
skb
;
}
pih
=
skb
?
(
struct
igmpv3_report
*
)
skb
->
h
.
igmph
:
0
;
...
...
net/ipv6/mcast.c
View file @
c87ec979
...
...
@@ -1321,8 +1321,17 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
if
(
type
==
MLD2_ALLOW_NEW_SOURCES
||
type
==
MLD2_BLOCK_OLD_SOURCES
)
return
skb
;
if
(
pmc
->
mca_crcount
||
isquery
)
if
(
pmc
->
mca_crcount
||
isquery
)
{
/* make sure we have room for group header and at
* least one source.
*/
if
(
skb
&&
AVAILABLE
(
skb
)
<
sizeof
(
struct
mld2_grec
)
+
sizeof
(
struct
in6_addr
))
{
mld_sendpack
(
skb
);
skb
=
0
;
/* add_grhead will get a new one */
}
skb
=
add_grhead
(
skb
,
pmc
,
type
,
&
pgr
);
}
return
skb
;
}
pmr
=
skb
?
(
struct
mld2_report
*
)
skb
->
h
.
raw
:
0
;
...
...
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