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
f69e6d13
Commit
f69e6d13
authored
Nov 24, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ip_generic_getfrag, udplite_getfrag: switch to passing msghdr
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
19e3c66b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
10 deletions
+11
-10
include/net/udplite.h
include/net/udplite.h
+2
-1
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+3
-3
net/ipv4/raw.c
net/ipv4/raw.c
+1
-1
net/ipv4/udp.c
net/ipv4/udp.c
+2
-2
net/ipv6/raw.c
net/ipv6/raw.c
+1
-1
net/ipv6/udp.c
net/ipv6/udp.c
+1
-1
net/l2tp/l2tp_ip6.c
net/l2tp/l2tp_ip6.c
+1
-1
No files found.
include/net/udplite.h
View file @
f69e6d13
...
...
@@ -19,7 +19,8 @@ extern struct udp_table udplite_table;
static
__inline__
int
udplite_getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
int
odd
,
struct
sk_buff
*
skb
)
{
return
memcpy_fromiovecend
(
to
,
(
struct
iovec
*
)
from
,
offset
,
len
);
struct
msghdr
*
msg
=
from
;
return
memcpy_fromiovecend
(
to
,
msg
->
msg_iov
,
offset
,
len
);
}
/* Designate sk as UDP-Lite socket */
...
...
net/ipv4/ip_output.c
View file @
f69e6d13
...
...
@@ -752,14 +752,14 @@ EXPORT_SYMBOL(ip_fragment);
int
ip_generic_getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
int
odd
,
struct
sk_buff
*
skb
)
{
struct
iovec
*
iov
=
from
;
struct
msghdr
*
msg
=
from
;
if
(
skb
->
ip_summed
==
CHECKSUM_PARTIAL
)
{
if
(
memcpy_fromiovecend
(
to
,
iov
,
offset
,
len
)
<
0
)
if
(
memcpy_fromiovecend
(
to
,
msg
->
msg_
iov
,
offset
,
len
)
<
0
)
return
-
EFAULT
;
}
else
{
__wsum
csum
=
0
;
if
(
csum_partial_copy_fromiovecend
(
to
,
iov
,
offset
,
len
,
&
csum
)
<
0
)
if
(
csum_partial_copy_fromiovecend
(
to
,
msg
->
msg_
iov
,
offset
,
len
,
&
csum
)
<
0
)
return
-
EFAULT
;
skb
->
csum
=
csum_block_add
(
skb
->
csum
,
csum
,
odd
);
}
...
...
net/ipv4/raw.c
View file @
f69e6d13
...
...
@@ -478,7 +478,7 @@ static int raw_getfrag(void *from, char *to, int offset, int len, int odd,
offset
-=
rfv
->
hlen
;
return
ip_generic_getfrag
(
rfv
->
msg
->
msg_iov
,
to
,
offset
,
len
,
odd
,
skb
);
return
ip_generic_getfrag
(
rfv
->
msg
,
to
,
offset
,
len
,
odd
,
skb
);
}
static
int
raw_sendmsg
(
struct
kiocb
*
iocb
,
struct
sock
*
sk
,
struct
msghdr
*
msg
,
...
...
net/ipv4/udp.c
View file @
f69e6d13
...
...
@@ -1049,7 +1049,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
/* Lockless fast path for the non-corking case. */
if
(
!
corkreq
)
{
skb
=
ip_make_skb
(
sk
,
fl4
,
getfrag
,
msg
->
msg_iov
,
ulen
,
skb
=
ip_make_skb
(
sk
,
fl4
,
getfrag
,
msg
,
ulen
,
sizeof
(
struct
udphdr
),
&
ipc
,
&
rt
,
msg
->
msg_flags
);
err
=
PTR_ERR
(
skb
);
...
...
@@ -1080,7 +1080,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
do_append_data:
up
->
len
+=
ulen
;
err
=
ip_append_data
(
sk
,
fl4
,
getfrag
,
msg
->
msg_iov
,
ulen
,
err
=
ip_append_data
(
sk
,
fl4
,
getfrag
,
msg
,
ulen
,
sizeof
(
struct
udphdr
),
&
ipc
,
&
rt
,
corkreq
?
msg
->
msg_flags
|
MSG_MORE
:
msg
->
msg_flags
);
if
(
err
)
...
...
net/ipv6/raw.c
View file @
f69e6d13
...
...
@@ -727,7 +727,7 @@ static int raw6_getfrag(void *from, char *to, int offset, int len, int odd,
offset
-=
rfv
->
hlen
;
return
ip_generic_getfrag
(
rfv
->
msg
->
msg_iov
,
to
,
offset
,
len
,
odd
,
skb
);
return
ip_generic_getfrag
(
rfv
->
msg
,
to
,
offset
,
len
,
odd
,
skb
);
}
static
int
rawv6_sendmsg
(
struct
kiocb
*
iocb
,
struct
sock
*
sk
,
...
...
net/ipv6/udp.c
View file @
f69e6d13
...
...
@@ -1312,7 +1312,7 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
dontfrag
=
np
->
dontfrag
;
up
->
len
+=
ulen
;
getfrag
=
is_udplite
?
udplite_getfrag
:
ip_generic_getfrag
;
err
=
ip6_append_data
(
sk
,
getfrag
,
msg
->
msg_iov
,
ulen
,
err
=
ip6_append_data
(
sk
,
getfrag
,
msg
,
ulen
,
sizeof
(
struct
udphdr
),
hlimit
,
tclass
,
opt
,
&
fl6
,
(
struct
rt6_info
*
)
dst
,
corkreq
?
msg
->
msg_flags
|
MSG_MORE
:
msg
->
msg_flags
,
dontfrag
);
...
...
net/l2tp/l2tp_ip6.c
View file @
f69e6d13
...
...
@@ -619,7 +619,7 @@ static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk,
back_from_confirm:
lock_sock
(
sk
);
err
=
ip6_append_data
(
sk
,
ip_generic_getfrag
,
msg
->
msg_iov
,
err
=
ip6_append_data
(
sk
,
ip_generic_getfrag
,
msg
,
ulen
,
transhdrlen
,
hlimit
,
tclass
,
opt
,
&
fl6
,
(
struct
rt6_info
*
)
dst
,
msg
->
msg_flags
,
dontfrag
);
...
...
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