Clarified error message if enabling UDP decapsulation fails
authorTobias Brunner <tobias@strongswan.org>
Thu, 27 Sep 2012 08:49:17 +0000 (10:49 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 27 Sep 2012 08:49:17 +0000 (10:49 +0200)
src/libcharon/plugins/socket_default/socket_default_socket.c
src/libcharon/plugins/socket_dynamic/socket_dynamic_socket.c

index 8ab5a8c..51432c9 100644 (file)
@@ -540,7 +540,8 @@ static int open_socket(private_socket_default_socket_t *this,
                !hydra->kernel_interface->enable_udp_decap(hydra->kernel_interface,
                                                                                                   skt, family, this->natt))
        {
                !hydra->kernel_interface->enable_udp_decap(hydra->kernel_interface,
                                                                                                   skt, family, this->natt))
        {
-               DBG1(DBG_NET, "enabling UDP decapsulation failed");
+               DBG1(DBG_NET, "enabling UDP decapsulation for %s on port %d failed",
+                        family == AF_INET ? "IPv4" : "IPv6", this->natt);
        }
 
        return skt;
        }
 
        return skt;
index e0e0af6..33f16cc 100644 (file)
@@ -406,7 +406,8 @@ static int open_socket(private_socket_dynamic_socket_t *this,
        if (!hydra->kernel_interface->enable_udp_decap(hydra->kernel_interface,
                                                                                                   fd, family, port))
        {
        if (!hydra->kernel_interface->enable_udp_decap(hydra->kernel_interface,
                                                                                                   fd, family, port))
        {
-               DBG1(DBG_NET, "enabling UDP decapsulation failed");
+               DBG1(DBG_NET, "enabling UDP decapsulation for %s on port %d failed",
+                        family == AF_INET ? "IPv4" : "IPv6", port);
        }
 
        return fd;
        }
 
        return fd;