gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13134 - gnunet/src/vpn


From: gnunet
Subject: [GNUnet-SVN] r13134 - gnunet/src/vpn
Date: Sun, 3 Oct 2010 19:24:26 +0200

Author: toelke
Date: 2010-10-03 19:24:26 +0200 (Sun, 03 Oct 2010)
New Revision: 13134

Modified:
   gnunet/src/vpn/gnunet-daemon-vpn.c
   gnunet/src/vpn/gnunet-helper-vpn.c
Log:
-Stop the vpn-helper if an invalid message arrives
-Note that restarting the helper demands restarting the hijacker, too

Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c  2010-10-03 17:24:25 UTC (rev 13133)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c  2010-10-03 17:24:26 UTC (rev 13134)
@@ -99,6 +99,8 @@
        PLIBC_KILL(mycls.helper_pid, SIGKILL);
        GNUNET_OS_process_wait(mycls.helper_pid);
 
+       // FIXME: send msg to service-dns -- the hijacker has to be started 
again, too, the routing table is flushed if it depends on one interface
+
        GNUNET_DISK_pipe_close(mycls.helper_in);
        GNUNET_DISK_pipe_close(mycls.helper_out);
 

Modified: gnunet/src/vpn/gnunet-helper-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-helper-vpn.c  2010-10-03 17:24:25 UTC (rev 13133)
+++ gnunet/src/vpn/gnunet-helper-vpn.c  2010-10-03 17:24:26 UTC (rev 13134)
@@ -221,6 +221,7 @@
                                        wri=0;
                                        goto outer;
                                }
+                               if(pkt->hdr.type != 
ntohs(GNUNET_MESSAGE_TYPE_VPN_HELPER)) abort();
                                while (r < ntohs(pkt->hdr.size)) {
                                        int t = read(0, buf + r, 
ntohs(pkt->hdr.size) - r);
                                        if (r < 0) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]