create/update_kernel_tunnel: add some debug logs

This commit is contained in:
Dominique Martinet 2023-08-21 20:29:15 +09:00 committed by Samuel Thibault
parent c8c197bf3a
commit 72fca9b8f0

View file

@ -640,7 +640,7 @@ static int create_kernel_tunnel(uint32_t tid, uint32_t peer_tid)
/* Already set up */ /* Already set up */
return 0; return 0;
LOG(3, 0, tid, "Creating kernel tunnel from %u to %u\n", tid, peer_tid); LOG(2, 0, tid, "Creating kernel tunnel from %u to %u\n", tid, peer_tid);
memset(&req, 0, sizeof(req)); memset(&req, 0, sizeof(req));
@ -704,8 +704,10 @@ static int create_kernel_tunnel(uint32_t tid, uint32_t peer_tid)
// Update remote address of kernel tunnel // Update remote address of kernel tunnel
static int update_kernel_tunnel(sessionidt s, tunnelidt t) static int update_kernel_tunnel(sessionidt s, tunnelidt t)
{ {
if (tunn_local[t].l2tp_fd < 0) if (tunn_local[t].l2tp_fd < 0) {
LOG(2, s, t, "IP change was requested for tunnel before it is connected\n");
return -1; return -1;
}
struct sockaddr_in tunneladdr; struct sockaddr_in tunneladdr;
memset(&tunneladdr, 0, sizeof(tunneladdr)); memset(&tunneladdr, 0, sizeof(tunneladdr));