From: Balazs Scheidler Date: Thu, 20 Nov 2008 09:07:24 +0000 (-0800) Subject: TPROXY: fill struct flowi->flags in udp_sendmsg() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a134f85c131ffd56720e38af2967ec6265480757;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git TPROXY: fill struct flowi->flags in udp_sendmsg() udp_sendmsg() didn't fill struct flowi->flags, which means that the route lookup would fail for non-local IPs even if the IP_TRANSPARENT sockopt was set. This prevents sendto() to work properly for UDP sockets, whereas bind(foreign-ip) + connect() + send() worked fine. Signed-off-by: Balazs Scheidler Signed-off-by: David S. Miller --- diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cf02701ced48..98c1fd09be88 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -633,6 +633,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, .saddr = saddr, .tos = tos } }, .proto = sk->sk_protocol, + .flags = inet_sk_flowi_flags(sk), .uli_u = { .ports = { .sport = inet->sport, .dport = dport } } };