diff --git a/conf/conf.c b/conf/conf.c index 710d5c20958d1f5f5d78b6ed1a2a2bbef7056db1..eeffd4a855d41966ed2fb85fce44ac2d906ad979 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -176,9 +176,9 @@ global_commit(struct config *new, struct config *old) if (!old) return 0; - if (!ipa_equal(old->bind_bgp_addr, new->bind_bgp_addr) || - (old->bind_bgp_port != new->bind_bgp_port) || - (old->bind_bgp_flags != new->bind_bgp_flags)) + if (!ipa_equal(old->listen_bgp_addr, new->listen_bgp_addr) || + (old->listen_bgp_port != new->listen_bgp_port) || + (old->listen_bgp_flags != new->listen_bgp_flags)) log(L_WARN "Reconfiguration of BGP listening socket not implemented, please restart BIRD."); if (!new->router_id) diff --git a/conf/conf.h b/conf/conf.h index 8c2d5491d097668d20b4f79a59e8c393d29db278..951dde3ca8c2c3752ffc2a08420396d7b7786d18 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -22,9 +22,9 @@ struct config { list logfiles; /* Configured log fils (sysdep) */ struct rtable_config *master_rtc; /* Configuration of master routing table */ u32 router_id; /* Our Router ID */ - ip_addr bind_bgp_addr; /* Listening BGP socket should use this address */ - unsigned bind_bgp_port; /* Listening BGP socket should use this port (0 is default) */ - u32 bind_bgp_flags; /* Listening BGP socket should use these flags */ + ip_addr listen_bgp_addr; /* Listening BGP socket should use this address */ + unsigned listen_bgp_port; /* Listening BGP socket should use this port (0 is default) */ + u32 listen_bgp_flags; /* Listening BGP socket should use these flags */ unsigned int proto_default_debug; /* Default protocol debug mask */ int cli_debug; /* Tracing of CLI connections and commands */ char *err_msg; /* Parser error message */ diff --git a/doc/bird.sgml b/doc/bird.sgml index 0b184281f5c17351179708c3d23f338595c8b7ce..267c768a186b01f60e2e95a96f95a548616e105d 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -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>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 protocol should listen. It is global option as listening socket is common to all BGP instances. Default is to listen on diff --git a/nest/config.Y b/nest/config.Y index b3dfdf2a8f89f34225fff3c6edea5e5c46289fa2..dc31224a6873475634216cb6ae0d4c8e5f3a96f8 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -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(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES) 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, 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 */ - | bind_opts bind_opt + | listen_opts listen_opt ; -bind_opt: - ADDRESS ipa { new_config->bind_bgp_addr = $2; } - | PORT expr { new_config->bind_bgp_port = $2; } - | V6ONLY { new_config->bind_bgp_flags |= SKF_V6ONLY; } +listen_opt: + ADDRESS ipa { new_config->listen_bgp_addr = $2; } + | PORT expr { new_config->listen_bgp_port = $2; } + | V6ONLY { new_config->listen_bgp_flags |= SKF_V6ONLY; } ; diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 2476c6601517dc65f19c15de9c7668f85b90f4f4..a6b9d5740e96e9bc60dd5bf5cabe9fb31ace5ed5 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -94,7 +94,7 @@ bgp_open(struct bgp_proto *p) bgp_counter++; 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) bgp_linpool = lp_new(&root_pool, 4080);