[ovs-dev] [PATCH v1] ipfix: Bug fix for not sending template packets on 32-bit OS

Ben Pfaff blp at ovn.org
Mon Jun 13 17:50:06 UTC 2016


On Sat, Jun 11, 2016 at 09:55:39AM +0800, Benli Ye wrote:
> 'last_template_set_time' in truct dpif_ipfix_exporter is declared
> as time_t and time_t is long int type. If we initialize
> 'last_template_set_time' as TIME_MIN, whose value is -2147483648
> on 32-bit OS and -2^63 on 64-bit OS. There will be a problem on
> 32-bit OS when comparing 'last_template_set_time' with a unisgned int
> type variable, because type casting will happen and negative value
> could be a large positive number. Fix this problem by simply initialize
> 'last_template_set_time' as 0.

I'm not really happy with the way that the ipfix module manages time,
but this seems like the best "quick fix" for older branches especially.

Can you provide a Signed-off-by?



More information about the dev mailing list