[Swan-dev] Libreswan Need Urgent Help with FATAL ERROR: bind(0.0.0.0:500) failed in find_raw_ifaces4()
Paul Wouters
paul at nohats.ca
Mon Aug 22 21:00:14 EEST 2022
On Mon, 22 Aug 2022, Praveen Chavan wrote:
> Pluto fails to start with error,
>
> Aug 22 14:48:02.318450: FATAL ERROR: bind(0.0.0.0:500) failed in find_raw_ifaces4()Address already in use (errno 98)
> Aug 22 14:48:02.318478: ABORT: ASSERTION FAILED: nr_helper_threads == 0 (free_server_helper_jobs() +595 programs/pluto/server_pool.c)
There is another IKE daemon (or something else binding to UDP port 500) already?
Try: sudo lsof -i udp:500
>
> However, when using the source rpm, locally built binaries instead, this error can be resolved with following change,
>
> /* in pluto/kernel_linux.c */
> if (0){
> ip_address any = address_any(&ipv4_info);
> ip_endpoint any_ep = endpoint(&any, pluto_port);
> ip_sockaddr any_sa;
> size_t any_sa_size = endpoint_to_sockaddr(&any_ep, &any_sa);
> if (bind(master_sock, &any_sa.sa, any_sa_size) < 0)
> EXIT_LOG_ERRNO(errno, "bind() failed in %s()", __func__);
> }
If you don't bind, it won't work because you are not listening on the socket. The patch is wrong.
Paul
More information about the Swan-dev
mailing list