aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-12 19:15:23 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-12 19:15:23 +0000
commit4e10f640dee8248a7736d8adc5b43a24fc5da162 (patch)
treee86ae349df6b0dc56fc84a9e41a15d685be20cde /src/vpn
parent8c1455f5b72338f2958fa0aa36928bd5bcf7956b (diff)
downloadgnunet-4e10f640dee8248a7736d8adc5b43a24fc5da162.tar.gz
gnunet-4e10f640dee8248a7736d8adc5b43a24fc5da162.zip
-fix testcase
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/test_gnunet_vpn.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vpn/test_gnunet_vpn.c b/src/vpn/test_gnunet_vpn.c
index d66e6fc7b..40e07850f 100644
--- a/src/vpn/test_gnunet_vpn.c
+++ b/src/vpn/test_gnunet_vpn.c
@@ -392,6 +392,8 @@ run (void *cls, char *const *args, const char *cfgfile,
392 const struct GNUNET_CONFIGURATION_Handle *cfg) 392 const struct GNUNET_CONFIGURATION_Handle *cfg)
393{ 393{
394 struct in_addr v4; 394 struct in_addr v4;
395 struct in_addr v6;
396 void *addr;
395 enum MHD_FLAG flags; 397 enum MHD_FLAG flags;
396 398
397 vpn = GNUNET_VPN_connect (cfg); 399 vpn = GNUNET_VPN_connect (cfg);
@@ -406,11 +408,24 @@ run (void *cls, char *const *args, const char *cfgfile,
406 MHD_OPTION_END); 408 MHD_OPTION_END);
407 GNUNET_assert (NULL != mhd); 409 GNUNET_assert (NULL != mhd);
408 mhd_main (); 410 mhd_main ();
409 GNUNET_assert (1 == inet_pton (dest_af, dest_ip, &v4)); 411 addr = NULL;
412 switch (dest_af)
413 {
414 case AF_INET:
415 GNUNET_assert (1 == inet_pton (dest_af, dest_ip, &v4));
416 addr = &v4;
417 break;
418 case AF_INET6:
419 GNUNET_assert (1 == inet_pton (dest_af, dest_ip, &v6));
420 addr = &v6;
421 break;
422 default:
423 GNUNET_assert (0);
424 }
410 rr = GNUNET_VPN_redirect_to_ip (vpn, 425 rr = GNUNET_VPN_redirect_to_ip (vpn,
411 src_af, 426 src_af,
412 dest_af, 427 dest_af,
413 &v4, 428 addr,
414 GNUNET_YES, 429 GNUNET_YES,
415 GNUNET_TIME_UNIT_FOREVER_ABS, 430 GNUNET_TIME_UNIT_FOREVER_ABS,
416 &allocation_cb, NULL); 431 &allocation_cb, NULL);