[radvd-devel-l] PATCH: Test configuration then exit
Iain J. Watson
lists at ij-watson.co.uk
Thu Dec 9 08:59:47 EST 2010
On Thu, Dec 9, 2010 at 6:47 AM, Pekka Savola <pekkas at netcore.fi> wrote:
> Hi,
>
> On Wed, 8 Dec 2010, Iain J. Watson wrote:
>>
>> This patch adds a flag '-c' to the radvd binary which will exit radvd
>> once completing the startup tests. This is similar to the 'configtest'
>> option in apache's apachectl command. This patch is built against the
>> current code available via cvs.
>>
>> I coded this patch as I am working on a programmatic way of adding and
>> removing subnets from a linux router. For health paranoia's sake I
>> wanted to check the new configuration that is generated is valid for
>> radvd to run against.
>
> Looks OK on the brief glance though I wondered a bit if the configtest
> printout could be integrated in one place e.g. under flog(). Given the low
> number of modified entries this maybe isn't worth it.
>
Alternative patch attached.
It does make it a simpler patch to use flog(). I originally didn't use
it because I wanted to make sure the output went to stderr regardless
of other command line options. By overriding the value of 'log_method'
if configtest is called the existing logging code can be used with no
changes.
I also fixed an error where I declared 'configtest' as a char instead of an int.
Regards,
Iain J. Watson
--
"Just think how stupid the average person is,
and then realize that half of them are even stupider!"
--George Carlin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radvd-configtest-2.patch
Type: application/octet-stream
Size: 1999 bytes
Desc: not available
URL: <http://lists.litech.org/pipermail/radvd-devel-l/attachments/20101209/22c30530/attachment.obj>
More information about the radvd-devel-l
mailing list