From: Balazs Scheidler <bazsi@balabit.hu>
Date: Thu, 20 Nov 2008 09:08:06 +0000 (-0800)
Subject: TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c82838458200ec4167ce7083b0a17474150c5bf7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()

    inet_sk_rebuild_header() does a new route lookup if the dst_entry
    associated with a socket becomes stale. However inet_sk_rebuild_header()
    didn't use struct flowi->flags, causing the route lookup to
    fail for foreign-bound IP_TRANSPARENT sockets, causing an error
    state to be set for the sockets in question.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 1fbff5fa4241..1aa2dc9e380e 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1117,6 +1117,7 @@ int inet_sk_rebuild_header(struct sock *sk)
 			},
 		},
 		.proto = sk->sk_protocol,
+		.flags = inet_sk_flowi_flags(sk),
 		.uli_u = {
 			.ports = {
 				.sport = inet->sport,