]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.35.9/xfrm4-strip-ecn-bits-from-tos-field.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.35.9 / xfrm4-strip-ecn-bits-from-tos-field.patch
1 From 78813c5af9277f6e3256c05614094dbfc2034071 Mon Sep 17 00:00:00 2001
2 From: Ulrich Weber <uweber@astaro.com>
3 Date: Wed, 22 Sep 2010 06:45:11 +0000
4 Subject: xfrm4: strip ECN bits from tos field
5
6
7 From: Ulrich Weber <uweber@astaro.com>
8
9 [ Upstream commit 94e2238969e89f5112297ad2a00103089dde7e8f ]
10
11 otherwise ECT(1) bit will get interpreted as RTO_ONLINK
12 and routing will fail with XfrmOutBundleGenError.
13
14 Signed-off-by: Ulrich Weber <uweber@astaro.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 ---
18 net/ipv4/xfrm4_policy.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/net/ipv4/xfrm4_policy.c
22 +++ b/net/ipv4/xfrm4_policy.c
23 @@ -61,7 +61,7 @@ static int xfrm4_get_saddr(struct net *n
24
25 static int xfrm4_get_tos(struct flowi *fl)
26 {
27 - return fl->fl4_tos;
28 + return IPTOS_RT_MASK & fl->fl4_tos; /* Strip ECN bits */
29 }
30
31 static int xfrm4_init_path(struct xfrm_dst *path, struct dst_entry *dst,