]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/route.c
[ARM] fix cache alignment code in memset.S
[linux-2.6-omap-h63xx.git] / net / ipv6 / route.c
index 220cffe9e63b483354ff8015b8929a9b4b01ffe6..d1f3e19b06c79ade99a6b34eb385ee15753c6c77 100644 (file)
@@ -2196,8 +2196,12 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
 
        NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric);
 
-       expires = (rt->rt6i_flags & RTF_EXPIRES) ?
-                       rt->rt6i_expires - jiffies : 0;
+       if (!(rt->rt6i_flags & RTF_EXPIRES))
+               expires = 0;
+       else if (rt->rt6i_expires - jiffies < INT_MAX)
+               expires = rt->rt6i_expires - jiffies;
+       else
+               expires = INT_MAX;
 
        if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0,
                               expires, rt->u.dst.error) < 0)