[Swan-dev] config file time without a suffix
D. Hugh Redelmeier
hugh at mimosa.com
Sun Aug 30 08:25:06 EEST 2015
I hearby confirm my laziness.
I'm waiting for a test to see if this change actually allows times to be
specified without a suffix. I could have built my own, but I didn't. I
do know that the change doesn't break any of our tests that normally work.
I don't even like this new feature. But it seems to be required for
smooth migration from old Openswan versions.
I also would like the testing/scripts/readwrite* tests to be dusted off.
And I'm too lazy to do that too.
---------- Forwarded message ----------
commit 2a6f1b5e987d72486b1b7eaef5f28807a48802fb
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date: Sun Aug 30 00:59:36 2015 -0400
libipsecconf: allow time with no unit suffix; detect more overflows
- be more careful with the result of strtoul:
- check errno (signifying overflow)
- before sticking the result in an unsigned int, check that it fits
- introduce the new non-terminal "duration" to the grammar. This
accepts a string (an integer with a unit suffix) or an integer
(presumed to be seconds). Times are now expressed as durations.
Odd fact: this seems to be the only non-terminal that
creates a synthetic attribute (i.e. sets $$).
- tidy some of the code in parser.y
More information about the Swan-dev
mailing list