From: Balazs Scheidler Date: Thu, 20 Nov 2008 09:07:24 +0000 (-0800) Subject: TPROXY: fill struct flowi->flags in udp_sendmsg() X-Git-Tag: v2.6.28-rc6~8^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a134f85c131ffd56720e38af2967ec6265480757;p=linux-2.6-omap-h63xx.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 cf02701ced4..98c1fd09be8 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 } } };