support of plutostderrlog keyword

This commit is contained in:
Andreas Steffen 2008-05-11 07:59:00 +00:00
parent 6cf1215e3c
commit 9a6d9f10e2
6 changed files with 8 additions and 4 deletions

View File

@ -170,6 +170,7 @@ static const token_info_t token_info[] =
{ ARG_STR, offsetof(starter_config_t, setup.charondebug), NULL },
{ ARG_STR, offsetof(starter_config_t, setup.prepluto), NULL },
{ ARG_STR, offsetof(starter_config_t, setup.postpluto), NULL },
{ ARG_ENUM, offsetof(starter_config_t, setup.plutostderrlog), LST_bool },
{ ARG_ENUM, offsetof(starter_config_t, setup.uniqueids), LST_unique },
{ ARG_UINT, offsetof(starter_config_t, setup.overridemtu), NULL },
{ ARG_TIME, offsetof(starter_config_t, setup.crlcheckinterval), NULL },

View File

@ -174,6 +174,7 @@ struct starter_config {
char *charondebug;
char *prepluto;
char *postpluto;
bool plutostderrlog;
bool uniqueids;
u_int overridemtu;
u_int crlcheckinterval;

View File

@ -101,7 +101,7 @@ starter_stop_charon (void)
int
starter_start_charon (starter_config_t *cfg, bool debug)
starter_start_charon (starter_config_t *cfg, bool no_fork)
{
struct stat stb;
int pid, i;
@ -114,7 +114,7 @@ starter_start_charon (starter_config_t *cfg, bool debug)
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
if (!debug)
if (!no_fork)
{
arg[argc++] = "--use-syslog";
}

View File

@ -104,7 +104,7 @@ starter_stop_pluto (void)
}
int
starter_start_pluto (starter_config_t *cfg, bool debug)
starter_start_pluto (starter_config_t *cfg, bool no_fork)
{
struct stat stb;
int i;
@ -121,7 +121,7 @@ starter_start_pluto (starter_config_t *cfg, bool debug)
printf ("starter_start_pluto entered\n");
if (debug)
if (cfg->setup.plutostderrlog || no_fork)
{
arg[argc++] = "--stderrlog";
}

View File

@ -30,6 +30,7 @@ typedef enum {
KW_CHARONDEBUG,
KW_PREPLUTO,
KW_POSTPLUTO,
KW_PLUTOSTDERRLOG,
KW_UNIQUEIDS,
KW_OVERRIDEMTU,
KW_CRLCHECKINTERVAL,

View File

@ -35,6 +35,7 @@ plutodebug, KW_PLUTODEBUG
charondebug, KW_CHARONDEBUG
prepluto, KW_PREPLUTO
postpluto, KW_POSTPLUTO
plutostderrlog, KW_PLUTOSTDERRLOG
fragicmp, KW_FRAGICMP
packetdefault, KW_PACKETDEFAULT
hidetos, KW_HIDETOS