mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
b88ed5cc88
commit
a134f85c13
1 changed files with 1 additions and 0 deletions
|
|
@ -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 } } };
|
||||
|
|
|
|||
Loading…
Reference in a new issue