Commit 086b85b8 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Unload BPF program after setting up all QUIC listeners

parent abee658a
......@@ -3885,10 +3885,6 @@ void reload_config(WorkerProcess *wp) {
#endif // ENABLE_HTTP3
));
#ifdef ENABLE_HTTP3
ipc_send(last_wp.get(), SHRPX_IPC_UNLOAD_BPF_OBJECT);
#endif // ENABLE_HTTP3
worker_process_adjust_limit();
if (!get_config()->pid_file.empty()) {
......
......@@ -31,7 +31,6 @@ namespace shrpx {
constexpr uint8_t SHRPX_IPC_REOPEN_LOG = 1;
constexpr uint8_t SHRPX_IPC_GRACEFUL_SHUTDOWN = 2;
constexpr uint8_t SHRPX_IPC_UNLOAD_BPF_OBJECT = 3;
} // namespace shrpx
......
......@@ -175,11 +175,6 @@ void ipc_readcb(struct ev_loop *loop, ev_io *w, int revents) {
case SHRPX_IPC_REOPEN_LOG:
reopen_log(conn_handler);
break;
#if defined(ENABLE_HTTP3) && defined(HAVE_LIBBPF)
case SHRPX_IPC_UNLOAD_BPF_OBJECT:
conn_handler->unload_bpf_objects();
break;
#endif // defined(ENABLE_HTTP3) && defined(HAVE_LIBBPF)
}
}
}
......@@ -608,6 +603,8 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
#endif // !NOTHREADS
}
conn_handler->unload_bpf_objects();
drop_privileges(
#ifdef HAVE_NEVERBLEED
nb.get()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment