netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfrm4: strip ECN bits from tos field
@ 2010-09-22 16:45 Ulrich Weber
  2010-09-23  3:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Weber @ 2010-09-22 16:45 UTC (permalink / raw)
  To: davem; +Cc: netdev

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

Signed-off-by: Ulrich Weber <uweber@astaro.com>
---
 net/ipv4/xfrm4_policy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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,
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfrm4: strip ECN bits from tos field
  2010-09-22 16:45 [PATCH] xfrm4: strip ECN bits from tos field Ulrich Weber
@ 2010-09-23  3:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-09-23  3:26 UTC (permalink / raw)
  To: uweber; +Cc: netdev

From: Ulrich Weber <uweber@astaro.com>
Date: Wed, 22 Sep 2010 18:45:11 +0200

> otherwise ECT(1) bit will get interpreted as RTO_ONLINK
> and routing will fail with XfrmOutBundleGenError.
> 
> Signed-off-by: Ulrich Weber <uweber@astaro.com>

Applied, thanks a lot.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-23  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-22 16:45 [PATCH] xfrm4: strip ECN bits from tos field Ulrich Weber
2010-09-23  3:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).