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
b6f21b26
Commit
b6f21b26
authored
Mar 12, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipv4: Use flowi4 in UDP
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
3073e5ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
net/ipv4/udp.c
net/ipv4/udp.c
+8
-6
No files found.
net/ipv4/udp.c
View file @
b6f21b26
...
@@ -770,7 +770,7 @@ static int udp_push_pending_frames(struct sock *sk)
...
@@ -770,7 +770,7 @@ static int udp_push_pending_frames(struct sock *sk)
{
{
struct
udp_sock
*
up
=
udp_sk
(
sk
);
struct
udp_sock
*
up
=
udp_sk
(
sk
);
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
flowi
*
fl
=
&
inet
->
cork
.
fl
;
struct
flowi
4
*
fl4
=
&
inet
->
cork
.
fl
.
u
.
ip4
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
err
=
0
;
int
err
=
0
;
...
@@ -778,7 +778,7 @@ static int udp_push_pending_frames(struct sock *sk)
...
@@ -778,7 +778,7 @@ static int udp_push_pending_frames(struct sock *sk)
if
(
!
skb
)
if
(
!
skb
)
goto
out
;
goto
out
;
err
=
udp_send_skb
(
skb
,
fl
->
fl4_dst
,
fl
->
fl4_
dport
);
err
=
udp_send_skb
(
skb
,
fl
4
->
daddr
,
fl4
->
uli
.
ports
.
dport
);
out:
out:
up
->
len
=
0
;
up
->
len
=
0
;
...
@@ -791,6 +791,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -791,6 +791,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
{
{
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
udp_sock
*
up
=
udp_sk
(
sk
);
struct
udp_sock
*
up
=
udp_sk
(
sk
);
struct
flowi4
*
fl4
;
int
ulen
=
len
;
int
ulen
=
len
;
struct
ipcm_cookie
ipc
;
struct
ipcm_cookie
ipc
;
struct
rtable
*
rt
=
NULL
;
struct
rtable
*
rt
=
NULL
;
...
@@ -972,10 +973,11 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -972,10 +973,11 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
/*
/*
* Now cork the socket to pend data.
* Now cork the socket to pend data.
*/
*/
inet
->
cork
.
fl
.
fl4_dst
=
daddr
;
fl4
=
&
inet
->
cork
.
fl
.
u
.
ip4
;
inet
->
cork
.
fl
.
fl4_dport
=
dport
;
fl4
->
daddr
=
daddr
;
inet
->
cork
.
fl
.
fl4_src
=
saddr
;
fl4
->
saddr
=
saddr
;
inet
->
cork
.
fl
.
fl4_sport
=
inet
->
inet_sport
;
fl4
->
uli
.
ports
.
dport
=
dport
;
fl4
->
uli
.
ports
.
sport
=
inet
->
inet_sport
;
up
->
pending
=
AF_INET
;
up
->
pending
=
AF_INET
;
do_append_data:
do_append_data:
...
...
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