Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

IPV6 Webserver. #39

Copy link
Copy link
Open
Open
Copy link
@redDott

Description

@redDott
Issue body actions

Hi I've tried you HTTPS-and-HTTP.ino excample and it works fine for IPv4.
Currently I'm trying to use IPv6 instead.
I have configured the WIFI to get an IPv6 addres which works fine I can ping the address.

then I have changed your code of HTTPServer to use IPV6 sockets.

uint8_t HTTPServer::setupSocket() {
  // (AF_INET = IPv4, SOCK_STREAM = TCP)
  _socket = socket(AF_INET6, SOCK_STREAM, IPPROTO_IPV6);
  if (_socket>=0) {
    _sock_addr.sin6_family = AF_INET6;
    // Listen on all interfaces
    struct in6_addr lo6 = IN6ADDR_LOOPBACK_INIT;
    _sock_addr.sin6_addr = lo6 ;
     Serial.println("_bindAddress");
    // Set the server port
    _sock_addr.sin6_port = htons(_port);
    // Now bind the TCP socket we did create above to the socket address we specified
    // (The TCP-socket now listens on 0.0.0.0:port)
    int err = bind(_socket, (struct sockaddr* )&_sock_addr, sizeof(_sock_addr));
	#if LWIP_IPV6
		Serial.println("ipv6");			
	#endif /* LWIP_IPV6 */

But connecting with curl to the IPv6 address i'm getting a connection refused.

When the ESP32 is not running I'm getting timeouts for ping and curl. If I try curl with IPv4 I get the expected output.
Any hints where I have to look in the code for IPv6 support?
Regards
Matthias

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.