summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/bird.sgml9
-rw-r--r--nest/config.Y5
-rw-r--r--proto/bgp/bgp.c2
3 files changed, 9 insertions, 7 deletions
diff --git a/doc/bird.sgml b/doc/bird.sgml
index a760b9d..53d9fcd 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 39cd901..920a305 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 ba5d755..327292a 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;