0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 09:58:43 +00:00

Flock: misc

This commit is contained in:
Maria Matejka 2024-09-16 23:10:41 +02:00
parent 4bc6d4f466
commit 7b4b471d5a
2 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include "flock/flock.h"
#include "lib/obstacle.h"
#include "lib/runtime.h"
#include "lib/string.h"
#include "lib/timer.h"
#include "sysdep/unix/unix.h"
@ -11,6 +12,7 @@
#include <poll.h>
#include <sched.h>
#include <signal.h>
#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mount.h>
@ -160,6 +162,10 @@ main(int argc, char **argv, char **argh UNUSED)
birdloop_init();
struct global_runtime gr = *atomic_load_explicit(&global_runtime, memory_order_relaxed);
// gr.latency_debug = ~0;
switch_runtime(&gr);
ev_init_list(&global_event_list, &main_birdloop, "Global event list");
ev_init_list(&global_work_list, &main_birdloop, "Global work list");
ev_init_list(&main_birdloop.event_list, &main_birdloop, "Global fast event list");

View File

@ -196,6 +196,13 @@ hypervisor_exposed_parent_rx(sock *sk, uint size UNUSED)
};
int e = recvmsg(sk->fd, &m, 0);
if (e < 3)
{
log(L_ERR "Exposed parent RX hangup, what the hell");
sk_close(sk);
ev_send_loop(&main_birdloop, &poweroff_event);
return 0;
}
struct cmsghdr *c = CMSG_FIRSTHDR(&m);
memcpy(&sfd, CMSG_DATA(c), sizeof sfd);