mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
Fix ping via directory service test
This commit is contained in:
parent
a516af616e
commit
36b0fe51ae
@ -433,8 +433,6 @@ overlay_interface_init(const char *name, struct in_addr src_addr, struct in_addr
|
||||
tick_ms=0;
|
||||
}else if (!interface->send_broadcasts){
|
||||
INFOF("Interface %s is not sending any broadcast traffic!", name);
|
||||
// no broadcast traffic implies no ticks
|
||||
tick_ms=0;
|
||||
}else if (tick_ms==0)
|
||||
INFOF("Interface %s is running tickless", name);
|
||||
|
||||
@ -756,7 +754,9 @@ static void overlay_interface_poll(struct sched_ent *alarm)
|
||||
alarm->alarm=-1;
|
||||
|
||||
time_ms_t now = gettime_ms();
|
||||
if (interface->state==INTERFACE_STATE_UP && interface->destination->tick_ms>0){
|
||||
if (interface->state==INTERFACE_STATE_UP
|
||||
&& interface->destination->tick_ms>0
|
||||
&& interface->send_broadcasts){
|
||||
if (now >= interface->destination->last_tx+interface->destination->tick_ms)
|
||||
overlay_send_tick_packet(interface->destination);
|
||||
alarm->alarm=interface->destination->last_tx+interface->destination->tick_ms;
|
||||
|
@ -917,6 +917,8 @@ int link_add_destinations(struct overlay_frame *frame)
|
||||
frame->packet_version = neighbour->subscriber->max_packet_version;
|
||||
|
||||
if (!dest->unicast){
|
||||
if (!dest->interface->send_broadcasts)
|
||||
continue;
|
||||
// make sure we only add broadcast interfaces once
|
||||
int id = dest->interface - overlay_interfaces;
|
||||
if (added_interface[id]){
|
||||
|
@ -107,25 +107,29 @@ start_routing_instance() {
|
||||
wait_until interface_up
|
||||
}
|
||||
|
||||
configure_node() {
|
||||
executeOk_servald config \
|
||||
set interfaces.0.file dummy1 \
|
||||
set interfaces.0.send_broadcasts 0 \
|
||||
set interfaces.0.drop_broadcasts on \
|
||||
set interfaces.0.default_route 1 \
|
||||
set interfaces.0.dummy_address 10.0.${instance_number}.1 \
|
||||
set interfaces.0.dummy_netmask 255.255.255.0
|
||||
}
|
||||
|
||||
setup_routing() {
|
||||
setup_servald
|
||||
assert_no_servald_processes
|
||||
foreach_instance +A +B +C create_single_identity
|
||||
>$SERVALD_VAR/dummy1
|
||||
foreach_instance +A +B +C \
|
||||
executeOk_servald config \
|
||||
set interfaces.0.file dummy1 \
|
||||
set interfaces.0.send_broadcasts 0 \
|
||||
set interfaces.0.default_route 1 \
|
||||
set interfaces.0.dummy_netmask 255.255.255.0
|
||||
configure_node
|
||||
set_instance +A
|
||||
executeOk_servald config \
|
||||
set interfaces.0.dummy_address 10.0.${instance_number}.1 \
|
||||
set dna.helper.executable "$servald_build_root/directory_service" \
|
||||
set debug.dnahelper on
|
||||
foreach_instance +B +C \
|
||||
executeOk_servald config \
|
||||
set interfaces.0.dummy_address 10.0.${instance_number}.1 \
|
||||
set directory.service $SIDA \
|
||||
set hosts.$SIDA.address 10.0.1.1
|
||||
foreach_instance +A +B +C start_routing_instance
|
||||
@ -135,8 +139,6 @@ setup_routing() {
|
||||
|
||||
doc_routing="Ping via relay node"
|
||||
test_routing() {
|
||||
foreach_instance +B +C \
|
||||
executeOk_servald scan 10.0.1.1
|
||||
foreach_instance +B +C \
|
||||
wait_until sent_directory_request
|
||||
set_instance +A
|
||||
|
Loading…
Reference in New Issue
Block a user