maidsafe/qp2p

IP V6 is not supported

Closed this issue · 2 comments

Testing bootstrap_node and client_node with IP V4 is OK:

Command server side:

$ RUST_LOG=bootstrap_node=info target/debug/examples/bootstrap_node --ip 116.203.42.154 --port 5483 --expected_conns 1
[2020-01-16T10:25:10Z INFO  bootstrap_node] QuicP2p started on 116.203.42.154:5483
Our connection info:
{"peer_addr":"116.203.42.154:5483","peer_cert_der":[48,130,1,79,48,129,246,160,3,2,1,2,2,1,42,48,10,6,8,42,134,72,206,61,4,3,2,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,34,24,15,49,57,55,53,48,49,48,49,48,48,48,48,48,48,90,24,15,52,48,57,54,48,49,48,49,48,48,48,48,48,48,90,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,91,52,55,9,205,180,86,71,19,143,185,160,85,128,200,145,32,1,139,236,126,147,238,150,201,247,156,78,134,85,191,203,66,165,82,182,107,66,35,48,112,31,63,34,148,197,249,199,128,74,218,3,22,108,163,38,76,61,42,103,252,122,145,196,163,27,48,25,48,23,6,3,85,29,17,4,16,48,14,130,12,77,97,105,100,83,65,70,69,46,110,101,116,48,10,6,8,42,134,72,206,61,4,3,2,3,72,0,48,69,2,32,39,74,203,148,153,231,248,148,140,39,99,190,215,247,208,104,227,213,216,96,60,226,192,3,79,173,226,123,165,20,112,211,2,33,0,215,21,57,239,21,254,177,166,30,28,24,60,175,183,77,126,147,127,98,121,105,57,175,52,126,210,63,230,189,76,66,37]}

[2020-01-16T10:25:49Z INFO  bootstrap_node] 1 connections collected, triggering the test
[2020-01-16T10:25:49Z WARN  bootstrap_node] Unexpected event: SentUserMessage { peer_addr: V4(116.203.42.154:443), msg: b"\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\xcb*\x9a\xbb\x01S\x01\0\0\0\0\0\00\x82\x01O0\x81\xf6\xa0\x03\x02\x01\x02\x02\x01*0\n\x06\x08*\x86H\xce=\x04\x03\x020!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16rcgen self signed cert0\"\x18\x0f19750101000000Z\x18\x0f40960101000000Z0!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16rcgen self signed cert0Y0\x13\x06\x07*\x86H\xce=\x02\x01\x06\x08*\x86H\xce=\x03\x01\x07\x03B\0\x04\xf2w\x95\xc8\xc2\x8c\x0e\xc0\x0e\xd6\xe7>\x18l\t\x04b\x87\xdery\x0c\x1ch\x1e\x9d\x7f>\xd4\xefd\xc2\xeb\xc5\n;.\xa3\x89`\xd8\x84\x9cV\xc8\xb9\xe2\xc3\xfcm\xa2P\xf8t\x9e9Y\x9a\x01\x921\x19\xaba\xa3\x1b0\x190\x17\x06\x03U\x1d\x11\x04\x100\x0e\x82\x0cMaidSAFE.net0\n\x06\x08*\x86H\xce=\x04\x03\x02\x03H\00E\x02!\0\xad\xd2\xc8F\x81'\xde\x81N0\xf8\xc5]\x1fz\"\x82pe\xe7\xe4\xb8U\x12\x12\x1f\\\xf6\xa6p\x0fT\x02 \r\x92\x0f\x9c\xe0\xba\x9e-\x06\xec\x01\xbb\x11\x8b;\x01\x99j`\xe3B\x96\x83>\xcb7\xb7?x8\xef<", token: 0 }
[2020-01-16T10:25:49Z WARN  bootstrap_node] Unexpected event: NewMessage { peer_addr: V4(116.203.42.154:443), msg: b"\x01\x02\x03" }
[2020-01-16T10:26:39Z WARN  bootstrap_node] Unexpected event: ConnectionFailure { peer_addr: V4(116.203.42.154:443), err: ConnectionCancelled }

Command client side:

$ RUST_LOG=client_node=info target/debug/examples/client_node --hard-coded-contacts '[{"peer_addr":"116.203.42.154:5483","peer_cert_der":[48,130,1,79,48,129,246,160,3,2,1,2,2,1,42,48,10,6,8,42,134,72,206,61,4,3,2,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,34,24,15,49,57,55,53,48,49,48,49,48,48,48,48,48,48,90,24,15,52,48,57,54,48,49,48,49,48,48,48,48,48,48,90,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,91,52,55,9,205,180,86,71,19,143,185,160,85,128,200,145,32,1,139,236,126,147,238,150,201,247,156,78,134,85,191,203,66,165,82,182,107,66,35,48,112,31,63,34,148,197,249,199,128,74,218,3,22,108,163,38,76,61,42,103,252,122,145,196,163,27,48,25,48,23,6,3,85,29,17,4,16,48,14,130,12,77,97,105,100,83,65,70,69,46,110,101,116,48,10,6,8,42,134,72,206,61,4,3,2,3,72,0,48,69,2,32,39,74,203,148,153,231,248,148,140,39,99,190,215,247,208,104,227,213,216,96,60,226,192,3,79,173,226,123,165,20,112,211,2,33,0,215,21,57,239,21,254,177,166,30,28,24,60,175,183,77,126,147,127,98,121,105,57,175,52,126,210,63,230,189,76,66,37]}]'
CliArgs { quic_p2p_opts: Config { hard_coded_contacts: {NodeInfo { peer_addr: V4(116.203.42.154:5483), peer_cert_der: [48, 130, 1, 79, 48, 129, 246, 160, 3, 2, 1, 2, 2, 1, 42, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 2, 48, 33, 49, 31, 48, 29, 6, 3, 85, 4, 3, 12, 22, 114, 99, 103, 101, 110, 32, 115, 101, 108, 102, 32, 115, 105, 103, 110, 101, 100, 32, 99, 101, 114, 116, 48, 34, 24, 15, 49, 57, 55, 53, 48, 49, 48, 49, 48, 48, 48, 48, 48, 48, 90, 24, 15, 52, 48, 57, 54, 48, 49, 48, 49, 48, 48, 48, 48, 48, 48, 90, 48, 33, 49, 31, 48, 29, 6, 3, 85, 4, 3, 12, 22, 114, 99, 103, 101, 110, 32, 115, 101, 108, 102, 32, 115, 105, 103, 110, 101, 100, 32, 99, 101, 114, 116, 48, 89, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 66, 0, 4, 91, 52, 55, 9, 205, 180, 86, 71, 19, 143, 185, 160, 85, 128, 200, 145, 32, 1, 139, 236, 126, 147, 238, 150, 201, 247, 156, 78, 134, 85, 191, 203, 66, 165, 82, 182, 107, 66, 35, 48, 112, 31, 63, 34, 148, 197, 249, 199, 128, 74, 218, 3, 22, 108, 163, 38, 76, 61, 42, 103, 252, 122, 145, 196, 163, 27, 48, 25, 48, 23, 6, 3, 85, 29, 17, 4, 16, 48, 14, 130, 12, 77, 97, 105, 100, 83, 65, 70, 69, 46, 110, 101, 116, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 2, 3, 72, 0, 48, 69, 2, 32, 39, 74, 203, 148, 153, 231, 248, 148, 140, 39, 99, 190, 215, 247, 208, 104, 227, 213, 216, 96, 60, 226, 192, 3, 79, 173, 226, 123, 165, 20, 112, 211, 2, 33, 0, 215, 21, 57, 239, 21, 254, 177, 166, 30, 28, 24, 60, 175, 183, 77, 126, 147, 127, 98, 121, 105, 57, 175, 52, 126, 210, 63, 230, 189, 76, 66, 37] }}, port: None, ip: None, max_msg_size_allowed: None, idle_timeout_msec: None, keep_alive_interval_msec: None, our_complete_cert: None, bootstrap_cache_dir: None, our_type: Node } }
[2020-01-16T10:25:49Z INFO  client_node] Peer started
[2020-01-16T10:25:49Z INFO  client_node] Connected with: 116.203.42.154:5483
[2020-01-16T10:25:49Z INFO  client_node] Connected to bootstrap node. Waiting for other node contacts...
[2020-01-16T10:25:49Z WARN  client_node] Unexpected event: SentUserMessage { peer_addr: V4(116.203.42.154:5483), msg: b"\x01\x02\x03", token: 0 }

But using IP V6 is not OK:

Command server side:

$ RUST_LOG=bootstrap_node=info target/debug/examples/bootstrap_node --ip 2a01:4f8:1c1c:9ca9::1 --port 5483 --expected_conns 1
[2020-01-16T10:08:00Z INFO  bootstrap_node] QuicP2p started on [2a01:4f8:1c1c:9ca9::1]:5483
Our connection info:
{"peer_addr":"[2a01:4f8:1c1c:9ca9::1]:5483","peer_cert_der":[48,130,1,79,48,129,246,160,3,2,1,2,2,1,42,48,10,6,8,42,134,72,206,61,4,3,2,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,34,24,15,49,57,55,53,48,49,48,49,48,48,48,48,48,48,90,24,15,52,48,57,54,48,49,48,49,48,48,48,48,48,48,90,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,168,14,159,37,80,240,21,161,192,247,190,83,160,186,190,150,88,205,200,119,158,27,39,20,206,200,61,242,161,164,18,12,209,241,227,7,196,151,66,182,88,243,157,64,253,72,135,78,199,201,204,16,60,169,120,57,48,141,114,1,171,73,205,93,163,27,48,25,48,23,6,3,85,29,17,4,16,48,14,130,12,77,97,105,100,83,65,70,69,46,110,101,116,48,10,6,8,42,134,72,206,61,4,3,2,3,72,0,48,69,2,32,87,222,18,184,16,88,216,243,242,37,214,89,92,211,2,88,24,221,168,28,147,43,137,170,45,53,129,159,18,221,224,202,2,33,0,244,10,245,169,45,170,26,97,66,133,58,99,5,53,200,49,133,150,102,26,223,32,57,147,99,26,198,218,10,194,160,148]}

Command client side:

$ RUST_LOG=client_node=info target/debug/examples/client_node --hard-coded-contacts '[{"peer_addr":"[2a01:4f8:1c1c:9ca9::1]:5483","peer_cert_der":[48,130,1,79,48,129,246,160,3,2,1,2,2,1,42,48,10,6,8,42,134,72,206,61,4,3,2,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,34,24,15,49,57,55,53,48,49,48,49,48,48,48,48,48,48,90,24,15,52,48,57,54,48,49,48,49,48,48,48,48,48,48,90,48,33,49,31,48,29,6,3,85,4,3,12,22,114,99,103,101,110,32,115,101,108,102,32,115,105,103,110,101,100,32,99,101,114,116,48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,168,14,159,37,80,240,21,161,192,247,190,83,160,186,190,150,88,205,200,119,158,27,39,20,206,200,61,242,161,164,18,12,209,241,227,7,196,151,66,182,88,243,157,64,253,72,135,78,199,201,204,16,60,169,120,57,48,141,114,1,171,73,205,93,163,27,48,25,48,23,6,3,85,29,17,4,16,48,14,130,12,77,97,105,100,83,65,70,69,46,110,101,116,48,10,6,8,42,134,72,206,61,4,3,2,3,72,0,48,69,2,32,87,222,18,184,16,88,216,243,242,37,214,89,92,211,2,88,24,221,168,28,147,43,137,170,45,53,129,159,18,221,224,202,2,33,0,244,10,245,169,45,170,26,97,66,133,58,99,5,53,200,49,133,150,102,26,223,32,57,147,99,26,198,218,10,194,160,148]}]'
CliArgs { quic_p2p_opts: Config { hard_coded_contacts: {NodeInfo { peer_addr: V6([2a01:4f8:1c1c:9ca9::1]:5483), peer_cert_der: [48, 130, 1, 79, 48, 129, 246, 160, 3, 2, 1, 2, 2, 1, 42, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 2, 48, 33, 49, 31, 48, 29, 6, 3, 85, 4, 3, 12, 22, 114, 99, 103, 101, 110, 32, 115, 101, 108, 102, 32, 115, 105, 103, 110, 101, 100, 32, 99, 101, 114, 116, 48, 34, 24, 15, 49, 57, 55, 53, 48, 49, 48, 49, 48, 48, 48, 48, 48, 48, 90, 24, 15, 52, 48, 57, 54, 48, 49, 48, 49, 48, 48, 48, 48, 48, 48, 90, 48, 33, 49, 31, 48, 29, 6, 3, 85, 4, 3, 12, 22, 114, 99, 103, 101, 110, 32, 115, 101, 108, 102, 32, 115, 105, 103, 110, 101, 100, 32, 99, 101, 114, 116, 48, 89, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 66, 0, 4, 168, 14, 159, 37, 80, 240, 21, 161, 192, 247, 190, 83, 160, 186, 190, 150, 88, 205, 200, 119, 158, 27, 39, 20, 206, 200, 61, 242, 161, 164, 18, 12, 209, 241, 227, 7, 196, 151, 66, 182, 88, 243, 157, 64, 253, 72, 135, 78, 199, 201, 204, 16, 60, 169, 120, 57, 48, 141, 114, 1, 171, 73, 205, 93, 163, 27, 48, 25, 48, 23, 6, 3, 85, 29, 17, 4, 16, 48, 14, 130, 12, 77, 97, 105, 100, 83, 65, 70, 69, 46, 110, 101, 116, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 2, 3, 72, 0, 48, 69, 2, 32, 87, 222, 18, 184, 16, 88, 216, 243, 242, 37, 214, 89, 92, 211, 2, 88, 24, 221, 168, 28, 147, 43, 137, 170, 45, 53, 129, 159, 18, 221, 224, 202, 2, 33, 0, 244, 10, 245, 169, 45, 170, 26, 97, 66, 133, 58, 99, 5, 53, 200, 49, 133, 150, 102, 26, 223, 32, 57, 147, 99, 26, 198, 218, 10, 194, 160, 148] }}, port: None, ip: None, max_msg_size_allowed: None, idle_timeout_msec: None, keep_alive_interval_msec: None, our_complete_cert: None, bootstrap_cache_dir: None, our_type: Node } }

Server is not reached and connection info is not sent back to client.

My UFW configuration allows 5483/udp for both IP V4 and IP V6:

$ ufw status | grep 5483
5483/udp                   ALLOW       Anywhere
5483/udp (v6)              ALLOW       Anywhere (v6)

Can this issue be closed?

Ipv6 currently works as far as I know.

Yes, IPv6 works now.