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
964eb7b1
Commit
964eb7b1
authored
Jul 20, 2004
by
Samuel Thibault
Committed by
David S. Miller
Jul 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UDP]: Return true length if user specifies MSG_TRUNC.
parent
db3b92ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
net/ipv4/udp.c
net/ipv4/udp.c
+3
-0
net/ipv6/udp.c
net/ipv6/udp.c
+3
-0
No files found.
net/ipv4/udp.c
View file @
964eb7b1
...
...
@@ -828,7 +828,10 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
if
(
inet
->
cmsg_flags
)
ip_cmsg_recv
(
msg
,
skb
);
err
=
copied
;
if
(
flags
&
MSG_TRUNC
)
err
=
skb
->
len
-
sizeof
(
struct
udphdr
);
out_free:
skb_free_datagram
(
sk
,
skb
);
...
...
net/ipv6/udp.c
View file @
964eb7b1
...
...
@@ -436,7 +436,10 @@ static int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
sin6
->
sin6_scope_id
=
IP6CB
(
skb
)
->
iif
;
}
}
err
=
copied
;
if
(
flags
&
MSG_TRUNC
)
err
=
skb
->
len
-
sizeof
(
struct
udphdr
);
out_free:
skb_free_datagram
(
sk
,
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