From: Ulrich Weber Date: Wed, 22 Sep 2010 06:45:11 +0000 (+0000) Subject: xfrm4: strip ECN bits from tos field X-Git-Tag: v2.6.34.8~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b85d0141df0385ecfbbd6a5b6e11c5055226b9ed;p=thirdparty%2Fkernel%2Fstable.git xfrm4: strip ECN bits from tos field commit 94e2238969e89f5112297ad2a00103089dde7e8f upstream. otherwise ECT(1) bit will get interpreted as RTO_ONLINK and routing will fail with XfrmOutBundleGenError. Signed-off-by: Ulrich Weber Signed-off-by: David S. Miller Signed-off-by: Paul Gortmaker --- diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index e4a1483fba777..06705875d0e16 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -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,