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);
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))
{
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;
AS_HELP_STRING([--enable-werror], [enable -Werror (recommended for developers only)]))
AC_ARG_ENABLE(cumulus,
AS_HELP_STRING([--enable-cumulus], [enable Cumulus Switch Special Extensions]))
+AC_ARG_ENABLE(bgp-standalone,
+ AS_HELP_STRING([--enable-bgp-standalone], [Modify code to allow BGP to work without Zebra]))
AC_ARG_ENABLE(rr-semantics,
AS_HELP_STRING([--disable-rr-semantics], [disable the v6 Route Replace semantics]))
AC_DEFINE(HAVE_CUMULUS,,Compile Special Cumulus Code in)
fi
+if test "${enable_bgp_standalone}" = "yes" ; then
+ AC_DEFINE(HAVE_BGP_STANDALONE,,Allow BGP to work without Zebra)
+fi
+
if test "${enable_shell_access}" = "yes"; then
AC_DEFINE(HAVE_SHELL_ACCESS,,Allow user to use ssh/telnet/bash)
fi