diff options
author | Balazs Scheidler <bazsi@balabit.hu> | 2008-11-20 10:07:24 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 10:07:24 +0100 |
commit | a134f85c131ffd56720e38af2967ec6265480757 (patch) | |
tree | 855f671667da2643274af8d580e16843f4baa393 | |
parent | net: ipg.c fix bracing on endian swapping (diff) | |
download | linux-a134f85c131ffd56720e38af2967ec6265480757.tar.xz linux-a134f85c131ffd56720e38af2967ec6265480757.zip |
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 <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/udp.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 } } }; |