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
6e296c9f
Commit
6e296c9f
authored
Aug 07, 2003
by
David S. Miller
Committed by
Stephen Hemminger
Aug 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Make sure errors propagate properly in {udp,raw} sendmsg.
parent
3111b920
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+0
-1
net/ipv6/raw.c
net/ipv6/raw.c
+1
-1
net/ipv6/udp.c
net/ipv6/udp.c
+8
-5
No files found.
net/ipv6/ip6_output.c
View file @
6e296c9f
...
@@ -209,7 +209,6 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
...
@@ -209,7 +209,6 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
int
seg_len
=
skb
->
len
;
int
seg_len
=
skb
->
len
;
int
hlimit
;
int
hlimit
;
u32
mtu
;
u32
mtu
;
int
err
=
0
;
if
(
opt
)
{
if
(
opt
)
{
int
head_room
;
int
head_room
;
...
...
net/ipv6/raw.c
View file @
6e296c9f
...
@@ -659,7 +659,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
...
@@ -659,7 +659,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
fl
.
oif
=
np
->
mcast_oif
;
fl
.
oif
=
np
->
mcast_oif
;
dst
=
ip6_dst_lookup
(
sk
,
&
fl
);
dst
=
ip6_dst_lookup
(
sk
,
&
fl
);
if
(
dst
->
error
)
if
(
(
err
=
dst
->
error
)
)
goto
out
;
goto
out
;
if
(
hlimit
<
0
)
{
if
(
hlimit
<
0
)
{
...
...
net/ipv6/udp.c
View file @
6e296c9f
...
@@ -811,8 +811,10 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
...
@@ -811,8 +811,10 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
* The socket lock must be held while it's corked.
* The socket lock must be held while it's corked.
*/
*/
lock_sock
(
sk
);
lock_sock
(
sk
);
if
(
likely
(
up
->
pending
))
if
(
likely
(
up
->
pending
))
{
dst
=
NULL
;
goto
do_append_data
;
goto
do_append_data
;
}
release_sock
(
sk
);
release_sock
(
sk
);
}
}
ulen
+=
sizeof
(
struct
udphdr
);
ulen
+=
sizeof
(
struct
udphdr
);
...
@@ -929,7 +931,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
...
@@ -929,7 +931,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
fl
.
oif
=
np
->
mcast_oif
;
fl
.
oif
=
np
->
mcast_oif
;
dst
=
ip6_dst_lookup
(
sk
,
&
fl
);
dst
=
ip6_dst_lookup
(
sk
,
&
fl
);
if
(
dst
->
error
)
if
(
(
err
=
dst
->
error
)
)
goto
out
;
goto
out
;
if
(
hlimit
<
0
)
{
if
(
hlimit
<
0
)
{
...
@@ -968,9 +970,10 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
...
@@ -968,9 +970,10 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
else
if
(
!
corkreq
)
else
if
(
!
corkreq
)
err
=
udp_v6_push_pending_frames
(
sk
,
up
);
err
=
udp_v6_push_pending_frames
(
sk
,
up
);
ip6_dst_store
(
sk
,
dst
,
if
(
dst
)
!
ipv6_addr_cmp
(
&
fl
.
fl6_dst
,
&
np
->
daddr
)
?
ip6_dst_store
(
sk
,
dst
,
&
np
->
daddr
:
NULL
);
!
ipv6_addr_cmp
(
&
fl
.
fl6_dst
,
&
np
->
daddr
)
?
&
np
->
daddr
:
NULL
);
if
(
err
>
0
)
if
(
err
>
0
)
err
=
np
->
recverr
?
net_xmit_errno
(
err
)
:
0
;
err
=
np
->
recverr
?
net_xmit_errno
(
err
)
:
0
;
release_sock
(
sk
);
release_sock
(
sk
);
...
...
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