aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlurchi <lurchi@strangeplace.net>2019-06-27 18:18:44 +0200
committerlurchi <lurchi@strangeplace.net>2019-06-27 18:18:44 +0200
commite9a48fc54a426debfac840e5b1c228047133ef10 (patch)
tree36c216948c81251bcf1c0ea82701e76f6b2d02fb /src
parent526f247237ac70910b4974349418bbcbe7d9a123 (diff)
downloadgnunet-e9a48fc54a426debfac840e5b1c228047133ef10.tar.gz
gnunet-e9a48fc54a426debfac840e5b1c228047133ef10.zip
don't start exit helper if no exit is configured
Diffstat (limited to 'src')
-rw-r--r--src/exit/gnunet-daemon-exit.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 5bcf53f57..fc29849b5 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -3790,33 +3790,29 @@ run (void *cls,
3790 &max_connections)) 3790 &max_connections))
3791 max_connections = 1024; 3791 max_connections = 1024;
3792 parse_ip_options (); 3792 parse_ip_options ();
3793 if ( (ipv4_exit) || (ipv6_exit) ) 3793 if ( ! ((ipv4_enabled && ipv4_exit) || (ipv6_enabled && ipv6_exit) ))
3794 {
3795 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
3796 if (GNUNET_YES !=
3797 GNUNET_OS_check_helper_binary (binary,
3798 GNUNET_YES,
3799 "gnunet-vpn - - - 169.1.3.7 255.255.255.0")) //no nat, ipv4 only
3800 {
3801 GNUNET_free (binary);
3802 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
3803 _("`%s' must be installed SUID, EXIT will not work\n"),
3804 "gnunet-helper-exit");
3805 GNUNET_SCHEDULER_add_shutdown (&dummy_task,
3806 NULL);
3807 global_ret = 1;
3808 return;
3809 }
3810 GNUNET_free (binary);
3811 }
3812 if (! (ipv4_enabled || ipv6_enabled))
3813 { 3794 {
3814 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 3795 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
3815 _("No useful service enabled. Exiting.\n")); 3796 _("No useful service enabled. Exiting.\n"));
3816 GNUNET_SCHEDULER_shutdown (); 3797 GNUNET_SCHEDULER_shutdown ();
3817 return; 3798 return;
3818 } 3799 }
3819 3800 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
3801 if (GNUNET_YES !=
3802 GNUNET_OS_check_helper_binary (binary,
3803 GNUNET_YES,
3804 "gnunet-vpn - - - 169.1.3.7 255.255.255.0")) //no nat, ipv4 only
3805 {
3806 GNUNET_free (binary);
3807 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
3808 _("`%s' must be installed SUID, EXIT will not work\n"),
3809 "gnunet-helper-exit");
3810 GNUNET_SCHEDULER_add_shutdown (&dummy_task,
3811 NULL);
3812 global_ret = 1;
3813 return;
3814 }
3815 GNUNET_free (binary);
3820 GNUNET_SCHEDULER_add_shutdown (&cleanup, 3816 GNUNET_SCHEDULER_add_shutdown (&cleanup,
3821 NULL); 3817 NULL);
3822 stats = GNUNET_STATISTICS_create ("exit", 3818 stats = GNUNET_STATISTICS_create ("exit",