ipv4: use RT_TOS after some rt_tos conversions
authorJulian Anastasov <ja@ssi.bg>
Sat, 23 Jul 2011 02:00:41 +0000 (02:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Jul 2011 03:05:31 +0000 (20:05 -0700)
rt_tos was changed to iph->tos but it must be filtered by RT_TOS

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c
net/ipv4/route.c

index aae2bd8cd9247d83ca1fb533ea6d7c4fb2507ed2..58e87915797651ae14cf9634a40b5d9382b42720 100644 (file)
@@ -1796,7 +1796,7 @@ static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)
        struct flowi4 fl4 = {
                .daddr = iph->daddr,
                .saddr = iph->saddr,
-               .flowi4_tos = iph->tos,
+               .flowi4_tos = RT_TOS(iph->tos),
                .flowi4_oif = rt->rt_oif,
                .flowi4_iif = rt->rt_iif,
                .flowi4_mark = rt->rt_mark,
index 33137307d52ad8a8c47e8a3d6bc19f7f8f54b6a6..1730689f560e67cd3e2142834d805216134202c9 100644 (file)
@@ -1740,7 +1740,7 @@ void ip_rt_get_source(u8 *addr, struct sk_buff *skb, struct rtable *rt)
                memset(&fl4, 0, sizeof(fl4));
                fl4.daddr = iph->daddr;
                fl4.saddr = iph->saddr;
-               fl4.flowi4_tos = iph->tos;
+               fl4.flowi4_tos = RT_TOS(iph->tos);
                fl4.flowi4_oif = rt->dst.dev->ifindex;
                fl4.flowi4_iif = skb->dev->ifindex;
                fl4.flowi4_mark = skb->mark;