Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEAT does not listen on IPv6 #414

Open
adventureloop opened this issue Jan 9, 2018 · 5 comments
Open

NEAT does not listen on IPv6 #414

adventureloop opened this issue Jan 9, 2018 · 5 comments
Assignees

Comments

@adventureloop
Copy link
Contributor

The tneat example does not seem to listen on ipv6, when it does listen on ipv4. v6 addresses are listed in the log messages. tcpdump shows resets for any requests.

14:39:44.031122 IP6 2001:630:241:204:c634:6bff:fe74:1375.50585 > 2001:630:241:204:c634:6bff:fe74:1375.23232: Flags [S], seq 4067143388, win 65535, options [mss 16324,nop,wscale 6,sackOK,TS val 2981753613 ecr 0], length 0   
14:39:44.031171 IP6 2001:630:241:204:c634:6bff:fe74:1375.23232 > 2001:630:241:204:c634:6bff:fe74:1375.50585: Flags [R.], seq 0, ack 4067143389, win 0, length 0  

To reproduce with tneat:

$ tneat

Connect with nc ipv4

$ nc 139.133.204.6 23232
asf                        
adf                        
^C                         

tneat side :

[   0.001799][DBG] nt_run_event_cb                                                                            
[   0.001827][INF] Available src-addresses:                                                                   
[   0.001852][INF]      IPv6: fe80::1/0 pref 4294967295 valid 4294967295                                      
[   0.001877][INF]      IPv6: ::1/0 pref 4294967295 valid 4294967295                                          
[   0.001906][INF]      IPv6: 2001:630:241:204:c634:6bff:fe74:1375/0 pref 604794 valid 2591994                
[   0.001932][INF]      IPv6: fe80::c634:6bff:fe74:1375/0 pref 4294967295 valid 4294967295                    
[   0.001957][INF]      IPv4: 139.133.204.6/0                                                                 
[   0.001981][DBG] nt_run_event_cb                                                                            
[   0.002002][INF] Available src-addresses:                                                                   
[   0.002025][INF]      IPv4: 127.0.0.1/0                                                                     
[   0.002048][INF]      IPv6: fe80::1/0 pref 4294967295 valid 4294967295                                      
[   0.002072][INF]      IPv6: ::1/0 pref 4294967295 valid 4294967295                                          
[   0.002099][INF]      IPv6: 2001:630:241:204:c634:6bff:fe74:1375/0 pref 604794 valid 2591994                
[   0.002125][INF]      IPv6: fe80::c634:6bff:fe74:1375/0 pref 4294967295 valid 4294967295                    
[   0.002149][INF]      IPv4: 139.133.204.6/0                                                                 
[   0.002171][DBG] nt_run_event_cb                                                                            
on_connected() - connection established                                                                       
on_close                                                                                                      
flow closed - statistics                                                                                      
    bytes           : 8                                                                                   
    rcv-calls       : 2                                                                                   
    duration        : 0.77s                                                                               
    bandwidth       : 10 B/s                                                                              
on_close - flow closed OK!                                                                                    

$ nc 2001:630:241:204:c634:6bff:fe74:1375 23232
@adventureloop
Copy link
Contributor Author

Two things,

  1. neat_accept will default to the ipv4 ANYADDR 0.0.0.0

https://github.com/NEAT-project/neat/blob/master/neat_core.c#L4524

I am not sure which is the correct default name to use, I would prefer ::, but I live in the future.

  1. the call to the resolver only requests AF_INET

https://github.com/NEAT-project/neat/blob/master/neat_core.c#L4551

This should be AF_UNSPEC according to man pages on Linux, FreeBSD and OS X.

@evyncke
Copy link

evyncke commented Jan 9, 2018 via email

@adventureloop
Copy link
Contributor Author

@evyncke this is what I thought, reading around and it gets less clear. Using :: and AF_UNSPEC causes ipv4 to hang as ipv6 did.

@evyncke
Copy link

evyncke commented Jan 9, 2018 via email

@tuexen
Copy link
Contributor

tuexen commented Jan 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants