support of plutostderrlog keyword
This commit is contained in:
@@ -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.charondebug), NULL },
|
||||||
{ ARG_STR, offsetof(starter_config_t, setup.prepluto), NULL },
|
{ ARG_STR, offsetof(starter_config_t, setup.prepluto), NULL },
|
||||||
{ ARG_STR, offsetof(starter_config_t, setup.postpluto), 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_ENUM, offsetof(starter_config_t, setup.uniqueids), LST_unique },
|
||||||
{ ARG_UINT, offsetof(starter_config_t, setup.overridemtu), NULL },
|
{ ARG_UINT, offsetof(starter_config_t, setup.overridemtu), NULL },
|
||||||
{ ARG_TIME, offsetof(starter_config_t, setup.crlcheckinterval), NULL },
|
{ ARG_TIME, offsetof(starter_config_t, setup.crlcheckinterval), NULL },
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ struct starter_config {
|
|||||||
char *charondebug;
|
char *charondebug;
|
||||||
char *prepluto;
|
char *prepluto;
|
||||||
char *postpluto;
|
char *postpluto;
|
||||||
|
bool plutostderrlog;
|
||||||
bool uniqueids;
|
bool uniqueids;
|
||||||
u_int overridemtu;
|
u_int overridemtu;
|
||||||
u_int crlcheckinterval;
|
u_int crlcheckinterval;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ starter_stop_charon (void)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
starter_start_charon (starter_config_t *cfg, bool debug)
|
starter_start_charon (starter_config_t *cfg, bool no_fork)
|
||||||
{
|
{
|
||||||
struct stat stb;
|
struct stat stb;
|
||||||
int pid, i;
|
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
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!debug)
|
if (!no_fork)
|
||||||
{
|
{
|
||||||
arg[argc++] = "--use-syslog";
|
arg[argc++] = "--use-syslog";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ starter_stop_pluto (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
starter_start_pluto (starter_config_t *cfg, bool debug)
|
starter_start_pluto (starter_config_t *cfg, bool no_fork)
|
||||||
{
|
{
|
||||||
struct stat stb;
|
struct stat stb;
|
||||||
int i;
|
int i;
|
||||||
@@ -121,7 +121,7 @@ starter_start_pluto (starter_config_t *cfg, bool debug)
|
|||||||
|
|
||||||
printf ("starter_start_pluto entered\n");
|
printf ("starter_start_pluto entered\n");
|
||||||
|
|
||||||
if (debug)
|
if (cfg->setup.plutostderrlog || no_fork)
|
||||||
{
|
{
|
||||||
arg[argc++] = "--stderrlog";
|
arg[argc++] = "--stderrlog";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ typedef enum {
|
|||||||
KW_CHARONDEBUG,
|
KW_CHARONDEBUG,
|
||||||
KW_PREPLUTO,
|
KW_PREPLUTO,
|
||||||
KW_POSTPLUTO,
|
KW_POSTPLUTO,
|
||||||
|
KW_PLUTOSTDERRLOG,
|
||||||
KW_UNIQUEIDS,
|
KW_UNIQUEIDS,
|
||||||
KW_OVERRIDEMTU,
|
KW_OVERRIDEMTU,
|
||||||
KW_CRLCHECKINTERVAL,
|
KW_CRLCHECKINTERVAL,
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ plutodebug, KW_PLUTODEBUG
|
|||||||
charondebug, KW_CHARONDEBUG
|
charondebug, KW_CHARONDEBUG
|
||||||
prepluto, KW_PREPLUTO
|
prepluto, KW_PREPLUTO
|
||||||
postpluto, KW_POSTPLUTO
|
postpluto, KW_POSTPLUTO
|
||||||
|
plutostderrlog, KW_PLUTOSTDERRLOG
|
||||||
fragicmp, KW_FRAGICMP
|
fragicmp, KW_FRAGICMP
|
||||||
packetdefault, KW_PACKETDEFAULT
|
packetdefault, KW_PACKETDEFAULT
|
||||||
hidetos, KW_HIDETOS
|
hidetos, KW_HIDETOS
|
||||||
|
|||||||
Reference in New Issue
Block a user