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
68ce1ca3
Commit
68ce1ca3
authored
Jul 21, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Make raw sockets behave like udp wrt. MSG_TRUNC.
parent
498ced50
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
net/ipv4/raw.c
net/ipv4/raw.c
+3
-1
net/ipv6/raw.c
net/ipv6/raw.c
+3
-0
No files found.
net/ipv4/raw.c
View file @
68ce1ca3
...
...
@@ -555,9 +555,11 @@ int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
if
(
inet
->
cmsg_flags
)
ip_cmsg_recv
(
msg
,
skb
);
if
(
flags
&
MSG_TRUNC
)
copied
=
skb
->
len
;
done:
skb_free_datagram
(
sk
,
skb
);
out:
return
err
?
:
copied
;
out:
return
err
?
err
:
copied
;
}
static
int
raw_init
(
struct
sock
*
sk
)
...
...
net/ipv6/raw.c
View file @
68ce1ca3
...
...
@@ -419,7 +419,10 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk,
if
(
np
->
rxopt
.
all
)
datagram_recv_ctl
(
sk
,
msg
,
skb
);
err
=
copied
;
if
(
flags
&
MSG_TRUNC
)
err
=
skb
->
len
;
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