nghttpx: Unload BPF program after setting up all QUIC listeners

This commit is contained in:
Tatsuhiro Tsujikawa 2021-10-04 22:39:31 +09:00
parent abee658a60
commit 086b85b8f9
3 changed files with 2 additions and 10 deletions

View File

@ -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()) {

View File

@ -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

View File

@ -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()