diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-03 10:02:24 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-03 10:02:24 +0100 |
commit | fcf5a4f4b3e1a984f65d873e7a5a8c830b1ad9bf (patch) | |
tree | f0b74ba2b40e633dd9ea59bfb1168d7fa759a5ef | |
parent | 5adc02a6f87bda06094ce36eb699884c03760bf5 (diff) |
Change default for BGP IPv6 socket to V6ONLY.
Also add a new option 'dual' for the old behavior.
-rw-r--r-- | doc/bird.sgml | 9 | ||||
-rw-r--r-- | nest/config.Y | 5 | ||||
-rw-r--r-- | proto/bgp/bgp.c | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml index a760b9db..53d9fcd0 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -270,14 +270,15 @@ 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>listen bgp [address <m/address/] [port <m/port/] [v6only]</tag> + <tag>listen bgp [address <m/address/] [port <m/port/] [dual]</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 all addresses (0.0.0.0) and port 179. In IPv6 mode, option - <cf/v6only/ can be used to specify that BGP socket should - listen to IPv6 connections only. This is needed if you want to - run both bird and bird6 on the same port. + <cf/dual/ can be used to specify that BGP socket should accept + both IPv4 and IPv6 connections (but even in that case, BIRD + would accept IPv6 routes only). Such behavior was default in + older versions of BIRD. <tag>timeformat route|protocol|base|log "<m/format1/" [<m/limit/ "<m/format2/"]</tag> This option allows to specify a format of date/time used by diff --git a/nest/config.Y b/nest/config.Y index 39cd9015..920a3054 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(LISTEN, BGP, V6ONLY, ADDRESS, PORT, PASSWORDS, DESCRIPTION) +CF_KEYWORDS(LISTEN, BGP, V6ONLY, DUAL, ADDRESS, PORT, PASSWORDS, DESCRIPTION) CF_KEYWORDS(RELOAD, IN, OUT, MRTDUMP, MESSAGES, RESTRICT, MEMORY, IGP_METRIC) CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT, @@ -97,7 +97,8 @@ listen_opts: 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; } + | V6ONLY { new_config->listen_bgp_flags = 0; } + | DUAL { new_config->listen_bgp_flags = 1; } ; diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index ba5d755d..327292a3 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -658,7 +658,7 @@ bgp_setup_listen_sk(ip_addr addr, unsigned port, u32 flags) s->type = SK_TCP_PASSIVE; s->saddr = addr; s->sport = port ? port : BGP_PORT; - s->flags = flags; + s->flags = flags ? 0 : SKF_V6ONLY; s->tos = IP_PREC_INTERNET_CONTROL; s->rbsize = BGP_RX_BUFFER_SIZE; s->tbsize = BGP_TX_BUFFER_SIZE; |