diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 02:09:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:50 -0500 |
commit | b6f21b268026165a239edb5f4d7120eacf7bc593 (patch) | |
tree | ee03e4fd4a48483bd4d0c21687509d93a3e91729 /net/ipv4 | |
parent | 3073e5ab927487328d48cd74faac0f95a8336867 (diff) |
ipv4: Use flowi4 in UDP
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 25c080798bd0..91cba3ca37c4 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -770,7 +770,7 @@ static int udp_push_pending_frames(struct sock *sk) | |||
770 | { | 770 | { |
771 | struct udp_sock *up = udp_sk(sk); | 771 | struct udp_sock *up = udp_sk(sk); |
772 | struct inet_sock *inet = inet_sk(sk); | 772 | struct inet_sock *inet = inet_sk(sk); |
773 | struct flowi *fl = &inet->cork.fl; | 773 | struct flowi4 *fl4 = &inet->cork.fl.u.ip4; |
774 | struct sk_buff *skb; | 774 | struct sk_buff *skb; |
775 | int err = 0; | 775 | int err = 0; |
776 | 776 | ||
@@ -778,7 +778,7 @@ static int udp_push_pending_frames(struct sock *sk) | |||
778 | if (!skb) | 778 | if (!skb) |
779 | goto out; | 779 | goto out; |
780 | 780 | ||
781 | err = udp_send_skb(skb, fl->fl4_dst, fl->fl4_dport); | 781 | err = udp_send_skb(skb, fl4->daddr, fl4->uli.ports.dport); |
782 | 782 | ||
783 | out: | 783 | out: |
784 | up->len = 0; | 784 | up->len = 0; |
@@ -791,6 +791,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
791 | { | 791 | { |
792 | struct inet_sock *inet = inet_sk(sk); | 792 | struct inet_sock *inet = inet_sk(sk); |
793 | struct udp_sock *up = udp_sk(sk); | 793 | struct udp_sock *up = udp_sk(sk); |
794 | struct flowi4 *fl4; | ||
794 | int ulen = len; | 795 | int ulen = len; |
795 | struct ipcm_cookie ipc; | 796 | struct ipcm_cookie ipc; |
796 | struct rtable *rt = NULL; | 797 | struct rtable *rt = NULL; |
@@ -972,10 +973,11 @@ back_from_confirm: | |||
972 | /* | 973 | /* |
973 | * Now cork the socket to pend data. | 974 | * Now cork the socket to pend data. |
974 | */ | 975 | */ |
975 | inet->cork.fl.fl4_dst = daddr; | 976 | fl4 = &inet->cork.fl.u.ip4; |
976 | inet->cork.fl.fl4_dport = dport; | 977 | fl4->daddr = daddr; |
977 | inet->cork.fl.fl4_src = saddr; | 978 | fl4->saddr = saddr; |
978 | inet->cork.fl.fl4_sport = inet->inet_sport; | 979 | fl4->uli.ports.dport = dport; |
980 | fl4->uli.ports.sport = inet->inet_sport; | ||
979 | up->pending = AF_INET; | 981 | up->pending = AF_INET; |
980 | 982 | ||
981 | do_append_data: | 983 | do_append_data: |