ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.18k stars 930 forks source link

The sendto failed error will cause an exception exit #1011

Closed xuan880 closed 1 year ago

xuan880 commented 2 years ago

I found that since V3.1.1-14-g3fa0fa1, if there is a sendto failed error, it will cause the edge to exit abnormally, I tested with V.3.1.1-29-g4a2c9ef but found that there is still this problem, I reverted to V.3.1.0-110-g0f15271 and the edge is back to normal, No more abnormal exits. log: Log of abnormal version: ➜ ~ sudo edge /etc/n2n/edge.conf -f 07/Jun/2022 16:11:41 [edge_utils.c:3164] adding supernode = xxx.xxx.xxx.xxx:xxxxxx 07/Jun/2022 16:11:41 [edge.c:1031] WARNING: switching to AES as key was provided 07/Jun/2022 16:11:41 [edge.c:1071] starting n2n edge 3.1.1-29-g4a2c9ef Jun 7 2022 14:03:09 07/Jun/2022 16:11:41 [edge.c:1077] using compression: none. 07/Jun/2022 16:11:41 [edge.c:1078] using AES cipher. 07/Jun/2022 16:11:41 [edge_utils.c:392] number of supernodes in the list: 1 07/Jun/2022 16:11:41 [edge_utils.c:394] supernode 0 => xxx.xxx.xxx.xxx:xxxxxx 07/Jun/2022 16:11:41 [edge.c:1102] use manually set IP address 07/Jun/2022 16:11:41 [edge.c:1220] created local tap device IP: 192.168.135.102, Mask: 255.255.255.0, MAC: 2E:9E:7A:BB:46:A7 07/Jun/2022 16:11:41 [edge.c:1279] WARNING: n2n has not been compiled with libcap-dev; some commands may fail 07/Jun/2022 16:11:41 [edge.c:1285] dropping privileges to uid=999, gid=999 07/Jun/2022 16:11:41 [edge.c:1310] edge started 07/Jun/2022 16:11:41 [edge_utils.c:1160] successfully joined multicast group 224.0.0.68:1968 07/Jun/2022 16:11:41 [edge_utils.c:2519] [OK] edge <<< ================ >>> supernode 07/Jun/2022 16:11:46 [edge_utils.c:1056] WARNING: sendto(aaa.aaa.aaa.aaa:40286) failed (1) Operation not permitted buffer overflow detected : edge terminated [1] 7080 abort sudo edge /etc/n2n/edge.conf -f

Normal version of the log: ➜ ~ sudo ./edge /etc/n2n/edge.conf -f 07/Jun/2022 16:10:03 [edge_utils.c:3564] adding supernode = xxx.xxx.xxx.xxx:xxxxxx 07/Jun/2022 16:10:03 [edge.c:1072] WARNING: switching to AES as key was provided 07/Jun/2022 16:10:03 [edge.c:1112] starting n2n edge 3.1.0-110-g0f15271 Mar 27 2022 21:31:21 07/Jun/2022 16:10:03 [edge.c:1118] using compression: none. 07/Jun/2022 16:10:03 [edge.c:1119] using AES cipher. 07/Jun/2022 16:10:03 [edge_utils.c:399] number of supernodes in the list: 1 07/Jun/2022 16:10:03 [edge_utils.c:401] supernode 0 => xxx.xxx.xxx.xxx:xxxxxx 07/Jun/2022 16:10:03 [edge.c:1143] use manually set IP address 07/Jun/2022 16:10:03 [edge.c:1258] created local tap device IP: 192.168.135.102, Mask: 255.255.255.0, MAC: 2E:9E:7A:BB:46:A7 07/Jun/2022 16:10:03 [edge.c:1325] WARNING: n2n has not been compiled with libcap-dev; some commands may fail 07/Jun/2022 16:10:03 [edge.c:1330] dropping privileges to uid=999, gid=999 07/Jun/2022 16:10:03 [edge.c:1356] edge started 07/Jun/2022 16:10:03 [edge_utils.c:1147] successfully joined multicast group 224.0.0.68:1968 07/Jun/2022 16:10:03 [edge_utils.c:2508] [OK] edge <<< ================ >>> supernode 07/Jun/2022 16:10:03 [edge_utils.c:1042] WARNING: sendto failed (1) Operation not permitted 07/Jun/2022 16:10:05 [edge_utils.c:1042] WARNING: sendto failed (1) Operation not permitted ^C07/Jun/2022 16:11:35 [edge.c:986] shutting down... 07/Jun/2022 16:11:35 [edge_utils.c:2780] ** 07/Jun/2022 16:11:35 [edge_utils.c:2781] Packet stats: 07/Jun/2022 16:11:35 [edge_utils.c:2782] TX P2P: 5 pkts 07/Jun/2022 16:11:35 [edge_utils.c:2783] RX P2P: 49 pkts 07/Jun/2022 16:11:35 [edge_utils.c:2784] TX Supernode: 92 pkts (82 broadcast) 07/Jun/2022 16:11:35 [edge_utils.c:2785] RX Supernode: 128 pkts (10 broadcast) 07/Jun/2022 16:11:35 [edge_utils.c:2786] **

hamishcoleman commented 2 years ago

We are tracking these abnormal exits in #991