summaryrefslogtreecommitdiff
path: root/bgpd/bgp_network.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2022-01-17 18:19:46 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2022-01-17 18:44:57 +0200
commit4122b697bbe16dc90a56e4d5597a203a7d31a494 (patch)
tree360945420973b505801588dcdf177ab378d55c3b /bgpd/bgp_network.c
parent40a19188d5cf8367dae63d993ffe863f493c6bd0 (diff)
bgpd: Relax peer to be on the same host
If the existing listener is the same as the peer, treat as self and reject. ``` exit1-debian-11# sh bgp listeners Name fd Address --------------------------- default 24 192.168.10.123 exit1-debian-11# con exit1-debian-11(config)# router bgp exit1-debian-11(config-router)# neighbor 192.168.10.123 remote-as external % Can not configure the local system as neighbor exit1-debian-11# sh bgp listeners Name fd Address --------------------------- default 24 0.0.0.0 default 25 :: exit1-debian-11# con exit1-debian-11(config)# router bgp exit1-debian-11(config-router)# neighbor 192.168.10.123 remote-as external % Can not configure the local system as neighbor exit1-debian-11(config-router)# exit1-debian-11# sh bgp listeners Name fd Address --------------------------- default 24 192.168.0.1 exit1-debian-11# con exit1-debian-11(config)# router bgp exit1-debian-11(config-router)# neighbor 192.168.10.123 remote-as external exit1-debian-11(config-router)# ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_network.c')
-rw-r--r--bgpd/bgp_network.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 09abb69968..3fb7619ed1 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -52,15 +52,6 @@ extern struct zebra_privs_t bgpd_privs;
static char *bgp_get_bound_name(struct peer *peer);
-/* BGP listening socket. */
-struct bgp_listener {
- int fd;
- union sockunion su;
- struct thread *thread;
- struct bgp *bgp;
- char *name;
-};
-
void bgp_dump_listener_info(struct vty *vty)
{
struct listnode *node;