summaryrefslogtreecommitdiff
path: root/src/6to4.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2011-11-25 13:03:05 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-28 15:55:35 +0100
commitd436afd59968222b29e6fad922c2f0941d2a79f3 (patch)
tree4f94a1f977eeb165306c03235a3fdc842b96bb90 /src/6to4.c
parentac9b140f8dd99d5aa13dae02f6903a4b7f9cfc4c (diff)
downloadconnman-d436afd59968222b29e6fad922c2f0941d2a79f3.tar.gz
connman-d436afd59968222b29e6fad922c2f0941d2a79f3.tar.bz2
connman-d436afd59968222b29e6fad922c2f0941d2a79f3.zip
6to4: Use the right interface index with gweb
Diffstat (limited to 'src/6to4.c')
-rw-r--r--src/6to4.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/6to4.c b/src/6to4.c
index 35540bf5..0dfcbf76 100644
--- a/src/6to4.c
+++ b/src/6to4.c
@@ -396,8 +396,8 @@ static gboolean web_result(GWebResult *result, gpointer user_data)
static int init_6to4(struct in_addr *ip4addr)
{
unsigned int a, b, c, d;
+ int ret, if_index;
in_addr_t addr;
- int ret;
DBG("");
@@ -426,9 +426,13 @@ static int init_6to4(struct in_addr *ip4addr)
if (ret)
goto error;
+ if_index = connman_inet_ifindex("tun6to4");
+ if (if_index < 0)
+ goto error;
+
/* We try to verify that connectivity through tunnel works ok.
*/
- web = g_web_new(0);
+ web = g_web_new(if_index);
if (web == NULL)
goto error;