From: David S. Miller Date: Sat, 12 Mar 2011 07:09:18 +0000 (-0500) Subject: ipv4: Use flowi4 in UDP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6f21b268026165a239edb5f4d7120eacf7bc593;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ipv4: Use flowi4 in UDP Signed-off-by: David S. Miller --- 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) { struct udp_sock *up = udp_sk(sk); struct inet_sock *inet = inet_sk(sk); - struct flowi *fl = &inet->cork.fl; + struct flowi4 *fl4 = &inet->cork.fl.u.ip4; struct sk_buff *skb; int err = 0; @@ -778,7 +778,7 @@ static int udp_push_pending_frames(struct sock *sk) if (!skb) goto out; - err = udp_send_skb(skb, fl->fl4_dst, fl->fl4_dport); + err = udp_send_skb(skb, fl4->daddr, fl4->uli.ports.dport); out: up->len = 0; @@ -791,6 +791,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, { struct inet_sock *inet = inet_sk(sk); struct udp_sock *up = udp_sk(sk); + struct flowi4 *fl4; int ulen = len; struct ipcm_cookie ipc; struct rtable *rt = NULL; @@ -972,10 +973,11 @@ back_from_confirm: /* * Now cork the socket to pend data. */ - inet->cork.fl.fl4_dst = daddr; - inet->cork.fl.fl4_dport = dport; - inet->cork.fl.fl4_src = saddr; - inet->cork.fl.fl4_sport = inet->inet_sport; + fl4 = &inet->cork.fl.u.ip4; + fl4->daddr = daddr; + fl4->saddr = saddr; + fl4->uli.ports.dport = dport; + fl4->uli.ports.sport = inet->inet_sport; up->pending = AF_INET; do_append_data: