]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xfrm4: strip ECN bits from tos field
authorUlrich Weber <uweber@astaro.com>
Wed, 22 Sep 2010 06:45:11 +0000 (06:45 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:13 +0000 (18:08 -0500)
commit 94e2238969e89f5112297ad2a00103089dde7e8f upstream.

otherwise ECT(1) bit will get interpreted as RTO_ONLINK
and routing will fail with XfrmOutBundleGenError.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/ipv4/xfrm4_policy.c

index e4a1483fba7776b3df5a9008967f5dc5a7c4b558..06705875d0e16e555511a0ab3f832ea3752411d9 100644 (file)
@@ -82,7 +82,7 @@ __xfrm4_find_bundle(struct flowi *fl, struct xfrm_policy *policy)
 
 static int xfrm4_get_tos(struct flowi *fl)
 {
-       return fl->fl4_tos;
+       return IPTOS_RT_MASK & fl->fl4_tos; /* Strip ECN bits */
 }
 
 static int xfrm4_init_path(struct xfrm_dst *path, struct dst_entry *dst,