Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
a18135eb
Commit
a18135eb
authored
Aug 15, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Add UDP_MIB_{SND,RCV}BUFERRORS handling.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
81aa646c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
net/ipv6/udp.c
net/ipv6/udp.c
+16
-1
No files found.
net/ipv6/udp.c
View file @
a18135eb
...
...
@@ -345,6 +345,8 @@ out:
static
inline
int
udpv6_queue_rcv_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
int
rc
;
if
(
!
xfrm6_policy_check
(
sk
,
XFRM_POLICY_IN
,
skb
))
{
kfree_skb
(
skb
);
return
-
1
;
...
...
@@ -356,7 +358,10 @@ static inline int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
return
0
;
}
if
(
sock_queue_rcv_skb
(
sk
,
skb
)
<
0
)
{
if
((
rc
=
sock_queue_rcv_skb
(
sk
,
skb
))
<
0
)
{
/* Note that an ENOMEM error is charged twice */
if
(
rc
==
-
ENOMEM
)
UDP_INC_STATS_BH
(
UDP_MIB_RCVBUFERRORS
);
UDP6_INC_STATS_BH
(
UDP_MIB_INERRORS
);
kfree_skb
(
skb
);
return
0
;
...
...
@@ -857,6 +862,16 @@ out:
UDP6_INC_STATS_USER
(
UDP_MIB_OUTDATAGRAMS
);
return
len
;
}
/*
* ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space. Reporting
* ENOBUFS might not be good (it's not tunable per se), but otherwise
* we don't have a good statistic (IpOutDiscards but it can be too many
* things). We could add another new stat but at least for now that
* seems like overkill.
*/
if
(
err
==
-
ENOBUFS
||
test_bit
(
SOCK_NOSPACE
,
&
sk
->
sk_socket
->
flags
))
{
UDP_INC_STATS_USER
(
UDP_MIB_SNDBUFERRORS
);
}
return
err
;
do_confirm:
...
...
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