tproxy: check for transparent flag in ip_route_newports
authorUlrich Weber <uweber@astaro.com>
Mon, 27 Sep 2010 03:31:00 +0000 (03:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2010 22:03:33 +0000 (15:03 -0700)
as done in ip_route_connect()

Signed-off-by: Ulrich Weber <uweber@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h

index bd732d62e1c3a3181c7c324d695b02e1548970e0..7e5e73bfa4dec8e2d45c834507f74d86484b8715 100644 (file)
@@ -199,6 +199,8 @@ static inline int ip_route_newports(struct rtable **rp, u8 protocol,
                fl.fl_ip_sport = sport;
                fl.fl_ip_dport = dport;
                fl.proto = protocol;
+               if (inet_sk(sk)->transparent)
+                       fl.flags |= FLOWI_FLAG_ANYSRC;
                ip_rt_put(*rp);
                *rp = NULL;
                security_sk_classify_flow(sk, &fl);