mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 11:25:41 +00:00
Disable ospfapi init by default.
This commit is contained in:
parent
e2ea9fef99
commit
c3abdb722d
@ -1,3 +1,8 @@
|
|||||||
|
2004-10-11 Hasso Tepper <hasso at quagga.net>
|
||||||
|
|
||||||
|
* ospfd.8: Update manpage: add info about new -a/--apiserver command
|
||||||
|
line switch.
|
||||||
|
|
||||||
2004-10-11 Paul Jakma <paul@dishone.st>
|
2004-10-11 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
* ospfd.texi: reformat the ospf md5 paragraph, add an additional
|
* ospfd.texi: reformat the ospf md5 paragraph, add an additional
|
||||||
|
@ -61,6 +61,9 @@ intrefaces.
|
|||||||
Specify the user and group to run as. User and group have to have same
|
Specify the user and group to run as. User and group have to have same
|
||||||
name at the moment. Default is \fIquagga\fR.
|
name at the moment. Default is \fIquagga\fR.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-a\fR, \fB\-\-apiserver \fR
|
||||||
|
Enable OSPF apiserver. Default is disabled.
|
||||||
|
.TP
|
||||||
\fB\-v\fR, \fB\-\-version\fR
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
Print the version and exit.
|
Print the version and exit.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-10-11 Hasso Tepper <hasso at quagga.net>
|
||||||
|
|
||||||
|
* ospf_main.c, ospf_opaque.c: Disable ospfapi init by default. New
|
||||||
|
command line switch to enable it.
|
||||||
|
|
||||||
2004-10-11 Paul Jakma <paul@dishone.st>
|
2004-10-11 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
* ospf_dump.c: (ospf_ip_header_dump) Assume header is in host order
|
* ospf_dump.c: (ospf_ip_header_dump) Assume header is in host order
|
||||||
|
@ -87,6 +87,7 @@ struct option longopts[] =
|
|||||||
{ "vty_addr", required_argument, NULL, 'A'},
|
{ "vty_addr", required_argument, NULL, 'A'},
|
||||||
{ "vty_port", required_argument, NULL, 'P'},
|
{ "vty_port", required_argument, NULL, 'P'},
|
||||||
{ "user", required_argument, NULL, 'u'},
|
{ "user", required_argument, NULL, 'u'},
|
||||||
|
{ "apiserver", no_argument, NULL, 'a'},
|
||||||
{ "version", no_argument, NULL, 'v'},
|
{ "version", no_argument, NULL, 'v'},
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
@ -99,6 +100,9 @@ struct thread_master *master;
|
|||||||
/* Process ID saved for use by init system */
|
/* Process ID saved for use by init system */
|
||||||
const char *pid_file = PATH_OSPFD_PID;
|
const char *pid_file = PATH_OSPFD_PID;
|
||||||
|
|
||||||
|
/* OSPF apiserver is disabled by default. */
|
||||||
|
int ospf_apiserver_enable = 0;
|
||||||
|
|
||||||
/* Help information display. */
|
/* Help information display. */
|
||||||
static void
|
static void
|
||||||
usage (char *progname, int status)
|
usage (char *progname, int status)
|
||||||
@ -115,6 +119,7 @@ Daemon which manages OSPF.\n\n\
|
|||||||
-A, --vty_addr Set vty's bind address\n\
|
-A, --vty_addr Set vty's bind address\n\
|
||||||
-P, --vty_port Set vty's port number\n\
|
-P, --vty_port Set vty's port number\n\
|
||||||
-u, --user User and group to run as\n\
|
-u, --user User and group to run as\n\
|
||||||
|
-a. --apiserver Enable OSPF apiserver\n\
|
||||||
-v, --version Print program version\n\
|
-v, --version Print program version\n\
|
||||||
-h, --help Display this help and exit\n\
|
-h, --help Display this help and exit\n\
|
||||||
\n\
|
\n\
|
||||||
@ -204,7 +209,7 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
opt = getopt_long (argc, argv, "dlf:i:hA:P:u:v", longopts, 0);
|
opt = getopt_long (argc, argv, "dlf:i:hA:P:u:av", longopts, 0);
|
||||||
|
|
||||||
if (opt == EOF)
|
if (opt == EOF)
|
||||||
break;
|
break;
|
||||||
@ -236,9 +241,12 @@ main (int argc, char **argv)
|
|||||||
vty_port = atoi (optarg);
|
vty_port = atoi (optarg);
|
||||||
vty_port = (vty_port ? vty_port : OSPF_VTY_PORT);
|
vty_port = (vty_port ? vty_port : OSPF_VTY_PORT);
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
ospfd_privs.group = ospfd_privs.user = optarg;
|
ospfd_privs.group = ospfd_privs.user = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'a':
|
||||||
|
ospf_apiserver_enable = 1;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
print_version (progname);
|
print_version (progname);
|
||||||
exit (0);
|
exit (0);
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
#ifdef SUPPORT_OSPF_API
|
#ifdef SUPPORT_OSPF_API
|
||||||
int ospf_apiserver_init (void);
|
int ospf_apiserver_init (void);
|
||||||
void ospf_apiserver_term (void);
|
void ospf_apiserver_term (void);
|
||||||
|
extern int ospf_apiserver_enable;
|
||||||
#endif /* SUPPORT_OSPF_API */
|
#endif /* SUPPORT_OSPF_API */
|
||||||
|
|
||||||
static void ospf_opaque_register_vty (void);
|
static void ospf_opaque_register_vty (void);
|
||||||
@ -91,7 +92,7 @@ ospf_opaque_init (void)
|
|||||||
#endif /* HAVE_OSPF_TE */
|
#endif /* HAVE_OSPF_TE */
|
||||||
|
|
||||||
#ifdef SUPPORT_OSPF_API
|
#ifdef SUPPORT_OSPF_API
|
||||||
if (ospf_apiserver_init () != 0)
|
if ((ospf_apiserver_enable) && (ospf_apiserver_init () != 0))
|
||||||
exit (1);
|
exit (1);
|
||||||
#endif /* SUPPORT_OSPF_API */
|
#endif /* SUPPORT_OSPF_API */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user