summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-09-09 00:48:02 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-09 00:48:02 +0200
commitb5826a12a2a4c4a9e4ccd267f47e2711683355f7 (patch)
tree8b70f37b66732dab9b29259f40182a77c85494a0 /bgpd
parentquagga-reload.py fails for "net add debug ospf6 lsa as-ext" (diff)
downloadfrr-b5826a12a2a4c4a9e4ccd267f47e2711683355f7.tar.xz
frr-b5826a12a2a4c4a9e4ccd267f47e2711683355f7.zip
bgpd: Allow bgp to work standalone
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_fsm.c2
-rw-r--r--bgpd/bgp_network.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index ae77ac421..046767177 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -1332,8 +1332,10 @@ bgp_start (struct peer *peer)
if (bgp_debug_neighbor_events(peer))
zlog_debug ("%s [FSM] Waiting for NHT", peer->host);
+#if !defined (HAVE_BGP_STANDALONE)
BGP_EVENT_ADD(peer, TCP_connection_open_failed);
return 0;
+#endif
}
status = bgp_connect (peer);
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 58761a11d..ecfc3f9fe 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -253,9 +253,13 @@ bgp_get_instance_for_inc_conn (int sock, struct bgp **bgp_inst)
rc = getsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, name, &name_len);
if (rc != 0)
{
+#if !defined (HAVE_BGP_STANDALONE)
zlog_err ("[Error] BGP SO_BINDTODEVICE get failed (%s), sock %d",
safe_strerror (errno), sock);
return -1;
+#else
+ strcpy (name, VRF_DEFAULT_NAME);
+#endif
}
if (!strlen(name))
@@ -671,7 +675,9 @@ bgp_getsockname (struct peer *peer)
{
zlog_err ("%s: nexthop_set failed, resetting connection - intf %p",
peer->host, peer->nexthop.ifp);
+#if !defined (HAVE_BGP_STANDALONE)
return -1;
+#endif
}
return 0;