Skip to content

Commit

Permalink
xfrm4: strip ECN bits from tos field
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ulrich Weber authored and David S. Miller committed Sep 23, 2010
1 parent 3f5a2a7 commit 94e2238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/xfrm4_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 94e2238

Please sign in to comment.