diff options
| author | Balazs Scheidler <bazsi@balabit.hu> | 2008-11-20 04:07:24 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-11-20 04:07:24 -0500 |
| commit | a134f85c131ffd56720e38af2967ec6265480757 (patch) | |
| tree | 855f671667da2643274af8d580e16843f4baa393 | |
| parent | b88ed5cc884e4c28d787cf0912b8635376f16a87 (diff) | |
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, | |||
| 633 | .saddr = saddr, | 633 | .saddr = saddr, |
| 634 | .tos = tos } }, | 634 | .tos = tos } }, |
| 635 | .proto = sk->sk_protocol, | 635 | .proto = sk->sk_protocol, |
| 636 | .flags = inet_sk_flowi_flags(sk), | ||
| 636 | .uli_u = { .ports = | 637 | .uli_u = { .ports = |
| 637 | { .sport = inet->sport, | 638 | { .sport = inet->sport, |
| 638 | .dport = dport } } }; | 639 | .dport = dport } } }; |
