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
50cbe9ab
Commit
50cbe9ab
authored
Aug 30, 2014
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: Validate xmit SKBs right when we pull them out of the qdisc.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
eae3f88e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
include/linux/netdevice.h
include/linux/netdevice.h
+1
-0
net/core/dev.c
net/core/dev.c
+1
-5
net/sched/sch_generic.c
net/sched/sch_generic.c
+4
-1
No files found.
include/linux/netdevice.h
View file @
50cbe9ab
...
...
@@ -2827,6 +2827,7 @@ int dev_set_mac_address(struct net_device *, struct sockaddr *);
int
dev_change_carrier
(
struct
net_device
*
,
bool
new_carrier
);
int
dev_get_phys_port_id
(
struct
net_device
*
dev
,
struct
netdev_phys_port_id
*
ppid
);
struct
sk_buff
*
validate_xmit_skb
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
);
int
dev_hard_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
,
struct
netdev_queue
*
txq
);
int
__dev_forward_skb
(
struct
net_device
*
dev
,
struct
sk_buff
*
skb
);
...
...
net/core/dev.c
View file @
50cbe9ab
...
...
@@ -2656,7 +2656,7 @@ struct sk_buff *validate_xmit_vlan(struct sk_buff *skb, netdev_features_t featur
return
skb
;
}
st
atic
st
ruct
sk_buff
*
validate_xmit_skb
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
struct
sk_buff
*
validate_xmit_skb
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
netdev_features_t
features
;
...
...
@@ -2719,10 +2719,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
{
int
rc
=
NETDEV_TX_OK
;
skb
=
validate_xmit_skb
(
skb
,
dev
);
if
(
!
skb
)
return
rc
;
if
(
likely
(
!
skb
->
next
))
return
xmit_one
(
skb
,
dev
,
txq
,
false
);
...
...
net/sched/sch_generic.c
View file @
50cbe9ab
...
...
@@ -70,8 +70,11 @@ static inline struct sk_buff *dequeue_skb(struct Qdisc *q)
}
else
skb
=
NULL
;
}
else
{
if
(
!
(
q
->
flags
&
TCQ_F_ONETXQUEUE
)
||
!
netif_xmit_frozen_or_stopped
(
txq
))
if
(
!
(
q
->
flags
&
TCQ_F_ONETXQUEUE
)
||
!
netif_xmit_frozen_or_stopped
(
txq
))
{
skb
=
q
->
dequeue
(
q
);
if
(
skb
)
skb
=
validate_xmit_skb
(
skb
,
qdisc_dev
(
q
));
}
}
return
skb
;
...
...
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