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.36-rc6~6^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94e2238969e89f5112297ad2a00103089dde7e8f;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git xfrm4: strip ECN bits from tos field 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 --- diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 869078d..a580349 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -61,7 +61,7 @@ static int xfrm4_get_saddr(struct net *net, 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,