diff --git a/l2tpns.c b/l2tpns.c index 572443f..34afaf7 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -640,7 +640,7 @@ static int create_kernel_tunnel(uint32_t tid, uint32_t peer_tid) /* Already set up */ 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)); @@ -704,8 +704,10 @@ static int create_kernel_tunnel(uint32_t tid, uint32_t peer_tid) // Update remote address of kernel tunnel 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; + } struct sockaddr_in tunneladdr; memset(&tunneladdr, 0, sizeof(tunneladdr));