Modify

Opened 3 years ago

#18923 new defect

IPv6 bind to interface poblem with cURL

Reported by: chris5560 Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

I'm running Xubuntu 14.10 and OpenWrt x86 r44296 inside VirtualBox both connected via NetworkBridge to the same router.
curl --interface ethx is not selecting the correct IPv6 address.
OpenWrt always using the ULA-Prefix. Whats going wrong inside OpenWrt IPv6 stack ?
It's not a problem of cURL Version 7.40 I also tested on 7.37 and 7.38.
Here the output of Xubuntu:

$ curl -V
curl 7.40.0 (i686-pc-linux-gnu) libcurl/7.40.0 OpenSSL/1.0.1f zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets 

christiana@V10-OWbuilder32:~/owbuild/trunk$ ifconfig eth0
eth0      Link encap:Ethernet  Hardware Adresse 08:00:27:9c:f9:f7  
          inet Adresse:172.27.10.167  Bcast:172.27.10.255  Maske:255.255.255.0
          inet6-Adresse: fd43:5368:6f6d:6500:38f8:890a:6806:a1f8/64 Gültigkeitsbereich:Global
          inet6-Adresse: fe80::a00:27ff:fe9c:f9f7/64 Gültigkeitsbereich:Verbindung
          inet6-Adresse: 2002:2518:848c:0:513a:c2bf:12b6:66bc/128 Gültigkeitsbereich:Global
          inet6-Adresse: 2002:2518:848c:0:a00:27ff:fe9c:f9f7/64 Gültigkeitsbereich:Global
          inet6-Adresse: fd43:5368:6f6d:6500:a00:27ff:fe9c:f9f7/64 Gültigkeitsbereich:Global
          inet6-Adresse: 2002:2518:848c:0:38f8:890a:6806:a1f8/64 Gültigkeitsbereich:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:4216 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:3215 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX-Bytes:3681891 (3.6 MB)  TX-Bytes:357487 (357.4 KB)

$ sudo curl -v --interface eth0 http://checkip.dyndns.com
* Rebuilt URL to: http://checkip.dyndns.com/
*   Trying 216.146.39.70...
* Local Interface eth0 is ip 172.27.10.167 using address family 2
* Local port: 0
* Connected to checkip.dyndns.com (216.146.39.70) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.40.0
> Host: checkip.dyndns.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/html
< Server: DynDNS-CheckIP/1.0
< Connection: close
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Length: 105
< 
<html><head><title>Current IP Check</title></head><body>Current IP Address: 37.24.132.140</body></html>
* Closing connection 0

$ sudo curl -v --interface eth0 http://checkipv6.dyndns.com
* Rebuilt URL to: http://checkipv6.dyndns.com/
*   Trying 2600:2004:0:1::1...
* Local Interface eth0 is ip 2002:2518:848c:0:513a:c2bf:12b6:66bc using address family 10
* Local port: 0
* Connected to checkipv6.dyndns.com (2600:2004:0:1::1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.40.0
> Host: checkipv6.dyndns.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/html
< Server: DynDNS-CheckIP/1.0
< Connection: close
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Length: 128
< 
<html><head><title>Current IP Check</title></head><body>Current IP Address: 2002:2518:848c:0:513a:c2bf:12b6:66bc</body></html>
* Closing connection 0

And here the output of OpenWrt:

# curl -V
curl 7.40.0 (i486-openwrt-linux-gnu) libcurl/7.40.0 OpenSSL/1.0.1l
Protocols: file ftp ftps http https 
Features: IPv6 Largefile SSL 

# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 08:00:27:D0:10:32  
          inet addr:172.27.10.128  Bcast:172.27.10.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fed0:1032/64 Scope:Link
          inet6 addr: 2002:2518:848c:0:806b:c629:b8b9:433/128 Scope:Global
          inet6 addr: fd43:5368:6f6d:6500:a00:27ff:fed0:1032/64 Scope:Global
          inet6 addr: 2002:2518:848c:0:a00:27ff:fed0:1032/64 Scope:Global
          inet6 addr: fd43:5368:6f6d:6500:806b:c629:b8b9:433/128 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17637 (17.2 KiB)  TX bytes:17420 (17.0 KiB)

# curl -v --interface eth1 http://checkip.dyndns.com
* Rebuilt URL to: http://checkip.dyndns.com/
*   Trying 216.146.38.70...
* Local Interface eth1 is ip 172.27.10.128 using address family 2
* Local port: 0
* Connected to checkip.dyndns.com (216.146.38.70) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.40.0
> Host: checkip.dyndns.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/html
< Server: DynDNS-CheckIP/1.0
< Connection: close
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Length: 105
< 
<html><head><title>Current IP Check</title></head><body>Current IP Address: 37.24.132.140</body></html>
* Closing connection 0

# curl -v --interface eth1 http://checkipv6.dyndns.com
* Rebuilt URL to: http://checkipv6.dyndns.com/
*   Trying 2600:2004:0:1::1...
* Local Interface eth1 is ip fd43:5368:6f6d:6500:a00:27ff:fed0:1032 using address family 10
* Local port: 0
* connect to 2600:2004:0:1::1 port 80 failed: Permission denied
* Failed to connect to checkipv6.dyndns.com port 80: Permission denied
* Closing connection 0
curl: (7) Failed to connect to checkipv6.dyndns.com port 80: Permission denied

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.