Thread (19 messages) 19 messages, 5 authors, 2012-07-30

Re: [PATCH v4] ipv6: fix incorrect route 'expires' value passed to userspace

From: David Miller <davem@davemloft.net>
Date: 2012-07-30 06:20:04

From: Li Wei <redacted>
Date: Mon, 30 Jul 2012 10:01:30 +0800
When userspace use RTM_GETROUTE to dump route table, with an already
expired route entry, we always got an 'expires' value(2147157)
calculated base on INT_MAX.

The reason of this problem is in the following satement:
	rt->dst.expires - jiffies < INT_MAX
gcc promoted the type of both sides of '<' to unsigned long, thus
a small negative value would be considered greater than INT_MAX.

With the help of Eric Dumazet, do the out of bound checks in
rtnl_put_cacheinfo(), _after_ conversion to clock_t.

Signed-off-by: Li Wei <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help