AC_ARG_ENABLE(debug, [ --enable-debug enable internal debugging routines (default: disabled)],,enable_debug=no)
AC_ARG_ENABLE(memcheck, [ --enable-memcheck check memory allocations when debugging (default: enabled)],,enable_memcheck=yes)
AC_ARG_ENABLE(client, [ --enable-client enable building of BIRD client (default: enabled)],,enable_client=yes)
-AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable building of IPv6 version (default: disabled)],,enable_ipv6=no)
+ AC_ARG_ENABLE(pthreads, [ --enable-pthreads enable POSIX threads support (default: detect)],,enable_pthreads=try)
-AC_ARG_WITH(suffix, [ --with-suffix=STRING use specified suffix for BIRD files (default: 6 for IPv6 version)],[given_suffix="yes"])
AC_ARG_WITH(sysconfig, [ --with-sysconfig=FILE use specified BIRD system configuration file])
AC_ARG_WITH(protocols, [ --with-protocols=LIST include specified routing protocols (default: all)],,[with_protocols="all"])
AC_ARG_WITH(sysinclude, [ --with-sysinclude=PATH search for system includes on specified place])
AC_SUBST(srcdir_rel_mf)
AC_SUBST(runtimedir)
- # all_protocols=bfd,bgp,ospf,pipe,radv,rip,static
- all_protocols=pipe,radv,rip,static
-if test "$enable_ipv6" = yes ; then
- ip=ipv6
- SUFFIX=6
- proto_radv=radv
-else
- ip=ipv4
- SUFFIX=""
-fi
--
- if test "$with_protocols" = all ; then
- with_protocols="$all_protocols"
-if test "$given_suffix" = yes ; then
- SUFFIX="$with_suffix"
--fi
-AC_SUBST(SUFFIX)
if test "$enable_debug" = yes ; then
- CONFIG_FILE="bird$SUFFIX.conf"
- CONTROL_SOCKET="bird$SUFFIX.ctl"
+ CONFIG_FILE="bird.conf"
+ CONTROL_SOCKET="bird.ctl"
else
- CONFIG_FILE="\$(sysconfdir)/bird$SUFFIX.conf"
- CONTROL_SOCKET="$runtimedir/bird$SUFFIX.ctl"
+ CONFIG_FILE="\$(sysconfdir)/bird.conf"
+ CONTROL_SOCKET="$runtimedir/bird.ctl"
fi
AC_SUBST(CONFIG_FILE)
AC_SUBST(CONTROL_SOCKET)
AC_SUBST(iproutedir)
-all_protocols="$proto_bfd bgp ospf pipe $proto_radv rip static"
++# all_protocols="$proto_bfd bgp ospf pipe radv rip static"
++all_protocols="pipe radv rip static"
+ all_protocols=`echo $all_protocols | sed 's/ /,/g'`
+
+ if test "$with_protocols" = all ; then
+ with_protocols="$all_protocols"
+ fi
+
AC_MSG_CHECKING([protocols])
protocols=`echo "$with_protocols" | sed 's/,/ /g'`
if test "$protocols" = no ; then protocols= ; fi
/* IP address */
case 'I':
+ ip = va_arg(args, ip_addr);
if (flags & SPECIAL)
- ip_ntox(va_arg(args, ip_addr), ipbuf);
+ ip6_ntox(ip, ipbuf);
else {
- ip_ntop(va_arg(args, ip_addr), ipbuf);
+ // XXXX better IPv4 / IPv6 distinction
+ if (ipa_is_ip4(ip))
+ ip4_ntop(ipa_to_ip4(ip), ipbuf);
+ else
+ ip6_ntop(ipa_to_ip6(ip), ipbuf);
- if (field_width > 0)
+ if (field_width == 1)
field_width = STD_ADDRESS_P_LENGTH;
}
s = ipbuf;
neigh_chstate(n, NEIGHBOR_DOWN);
rem_node(NODE n);
rfree(n->pool);
- OSPF_TRACE(D_EVENTS, "Deleting neigbor.");
+ OSPF_TRACE(D_EVENTS, "Deleting neigbor %R", rid);
}
+ static void
+ ospf_neigh_bfd_hook(struct bfd_request *req)
+ {
+ struct ospf_neighbor *n = req->data;
+ struct proto *p = &n->ifa->oa->po->proto;
+
+ if (req->down)
+ {
+ OSPF_TRACE(D_EVENTS, "BFD session down for %I on %s",
+ n->ip, n->ifa->iface->name);
+
+ ospf_neigh_remove(n);
+ }
+ }
+
+ void
+ ospf_neigh_update_bfd(struct ospf_neighbor *n, int use_bfd)
+ {
+ if (use_bfd && !n->bfd_req)
+ n->bfd_req = bfd_request_session(n->pool, n->ip, n->ifa->addr->ip, n->ifa->iface,
+ ospf_neigh_bfd_hook, n);
+
+ if (!use_bfd && n->bfd_req)
+ {
+ rfree(n->bfd_req);
+ n->bfd_req = NULL;
+ }
+ }
+
+
void
ospf_sh_neigh_info(struct ospf_neighbor *n)
{