Replace 'bind' option with 'listen' option.

To be consistent with other daemons.
This commit is contained in:
Ondrej Zajicek 2009-06-23 11:08:30 +02:00
parent da95a7a7da
commit d72cdff411
5 changed files with 17 additions and 17 deletions

View file

@ -176,9 +176,9 @@ global_commit(struct config *new, struct config *old)
if (!old) if (!old)
return 0; return 0;
if (!ipa_equal(old->bind_bgp_addr, new->bind_bgp_addr) || if (!ipa_equal(old->listen_bgp_addr, new->listen_bgp_addr) ||
(old->bind_bgp_port != new->bind_bgp_port) || (old->listen_bgp_port != new->listen_bgp_port) ||
(old->bind_bgp_flags != new->bind_bgp_flags)) (old->listen_bgp_flags != new->listen_bgp_flags))
log(L_WARN "Reconfiguration of BGP listening socket not implemented, please restart BIRD."); log(L_WARN "Reconfiguration of BGP listening socket not implemented, please restart BIRD.");
if (!new->router_id) if (!new->router_id)

View file

@ -22,9 +22,9 @@ struct config {
list logfiles; /* Configured log fils (sysdep) */ list logfiles; /* Configured log fils (sysdep) */
struct rtable_config *master_rtc; /* Configuration of master routing table */ struct rtable_config *master_rtc; /* Configuration of master routing table */
u32 router_id; /* Our Router ID */ u32 router_id; /* Our Router ID */
ip_addr bind_bgp_addr; /* Listening BGP socket should use this address */ ip_addr listen_bgp_addr; /* Listening BGP socket should use this address */
unsigned bind_bgp_port; /* Listening BGP socket should use this port (0 is default) */ unsigned listen_bgp_port; /* Listening BGP socket should use this port (0 is default) */
u32 bind_bgp_flags; /* Listening BGP socket should use these flags */ u32 listen_bgp_flags; /* Listening BGP socket should use these flags */
unsigned int proto_default_debug; /* Default protocol debug mask */ unsigned int proto_default_debug; /* Default protocol debug mask */
int cli_debug; /* Tracing of CLI connections and commands */ int cli_debug; /* Tracing of CLI connections and commands */
char *err_msg; /* Parser error message */ char *err_msg; /* Parser error message */

View file

@ -249,7 +249,7 @@ protocol rip {
<tag>router id <m/IPv4 address/</tag> Set BIRD's router ID. It's a world-wide unique identification of your router, usually one of router's IPv4 addresses. Default: in IPv4 version, the lowest IP address of a non-loopback interface. In IPv6 version, this option is mandatory. <tag>router id <m/IPv4 address/</tag> Set BIRD's router ID. It's a world-wide unique identification of your router, usually one of router's IPv4 addresses. Default: in IPv4 version, the lowest IP address of a non-loopback interface. In IPv6 version, this option is mandatory.
<tag>bind bgp [address <m/address/] [port <m/port/] [v6only]</tag> <tag>listen bgp [address <m/address/] [port <m/port/] [v6only]</tag>
This option allows to specify address and port where BGP This option allows to specify address and port where BGP
protocol should listen. It is global option as listening protocol should listen. It is global option as listening
socket is common to all BGP instances. Default is to listen on socket is common to all BGP instances. Default is to listen on

View file

@ -44,7 +44,7 @@ CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS) CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES) CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, GENERATE) CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, GENERATE)
CF_KEYWORDS(BIND, BGP, V6ONLY, ADDRESS, PORT) CF_KEYWORDS(LISTEN, BGP, V6ONLY, ADDRESS, PORT)
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT, CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE) RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE)
@ -84,19 +84,19 @@ idval:
; ;
CF_ADDTO(conf, bind) CF_ADDTO(conf, listen)
bind: BIND BGP bind_opts ';' ; listen: LISTEN BGP listen_opts ';' ;
bind_opts: listen_opts:
/* Nothing */ /* Nothing */
| bind_opts bind_opt | listen_opts listen_opt
; ;
bind_opt: listen_opt:
ADDRESS ipa { new_config->bind_bgp_addr = $2; } ADDRESS ipa { new_config->listen_bgp_addr = $2; }
| PORT expr { new_config->bind_bgp_port = $2; } | PORT expr { new_config->listen_bgp_port = $2; }
| V6ONLY { new_config->bind_bgp_flags |= SKF_V6ONLY; } | V6ONLY { new_config->listen_bgp_flags |= SKF_V6ONLY; }
; ;

View file

@ -94,7 +94,7 @@ bgp_open(struct bgp_proto *p)
bgp_counter++; bgp_counter++;
if (!bgp_listen_sk) if (!bgp_listen_sk)
bgp_listen_sk = bgp_setup_listen_sk(cfg->bind_bgp_addr, cfg->bind_bgp_port, cfg->bind_bgp_flags); bgp_listen_sk = bgp_setup_listen_sk(cfg->listen_bgp_addr, cfg->listen_bgp_port, cfg->listen_bgp_flags);
if (!bgp_linpool) if (!bgp_linpool)
bgp_linpool = lp_new(&root_pool, 4080); bgp_linpool = lp_new(&root_pool, 4080);