]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Allow connections with no v4|6 addr's in some conditions
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 9 Sep 2016 15:02:54 +0000 (11:02 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 9 Sep 2016 15:02:54 +0000 (11:02 -0400)
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 <sharpd@cumulusnetworks.com>
bgpd/bgp_packet.c

index 937623a30b2515a26d25c0c03e42377506a314a6..2f9fdd5a75439979beafca46399ec46f7963b8ac 100644 (file)
@@ -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);