From 1d808091d34785df0d8e62f5b388a25af48f9a93 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 9 Sep 2016 11:02:54 -0400 Subject: [PATCH] bgpd: Allow connections with no v4|6 addr's in some conditions When compiling/running in with --enable-bgp-standalone=yes allow v4 sessions to be established with no v4 address configured. Additionally allow v6 connections with no v6 addresses configured. Signed-off-by: Donald Sharp --- bgpd/bgp_packet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 937623a30b..2f9fdd5a75 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1163,10 +1163,12 @@ bgp_open_receive (struct peer *peer, bgp_size_t size) { if (!peer->nexthop.v4.s_addr) { +#if !defined (HAVE_BGP_STANDALONE) zlog_err ("%s: No local IPv4 addr resetting connection, fd %d", peer->host, peer->fd); bgp_notify_send (peer, BGP_NOTIFY_CEASE, BGP_NOTIFY_SUBCODE_UNSPECIFIC); return -1; +#endif } } if (peer->afc_nego[AFI_IP6][SAFI_UNICAST] || @@ -1176,10 +1178,12 @@ bgp_open_receive (struct peer *peer, bgp_size_t size) { if (IN6_IS_ADDR_UNSPECIFIED (&peer->nexthop.v6_global)) { +#if !defined (HAVE_BGP_STANDALONE) zlog_err ("%s: No local IPv6 addr resetting connection, fd %d", peer->host, peer->fd); bgp_notify_send (peer, BGP_NOTIFY_CEASE, BGP_NOTIFY_SUBCODE_UNSPECIFIC); return -1; +#endif } } peer->rtt = sockopt_tcp_rtt (peer->fd); -- 2.39.5