[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-devel] OpenVPN 2.1-rc5 released


  • Subject: Re: [Openvpn-devel] OpenVPN 2.1-rc5 released
  • From: "Alon Bar-Lev" <alon.barlev@xxxxxxxxx>
  • Date: Sat, 26 Jan 2008 01:44:38 +0200
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=fZeQNuxmfU9r4lJXZ8+GDJJXCHbgBoVeCaAnti4H57I=; b=HwbwSvmoJSBZmBo+d1ZYeKRqa9r4UMSiszfva1Czif0xJTPXjXeeJ0uBWtnpbqRv/HFkrfs1YNamyqX/tXWOnAXy9v0XSYezvhwimpceDCdez2BRFHZIUFUQYGkvkOc+PowMT/0bmjeQhPEmniwizawTDO5NA5w+Kk7YGUCH0AI=

Well...
From: http://bugs.gentoo.org/show_bug.cgi?id=207320, found out that:
When executing:
ip addr flush dev XXXX
On unprivileged user, you get infinite loop of iproute2... Reported
this to upstream.
So I had to workaround this using explicit del.

-r 2677:2682 https://svn.openvpn.net/projects/openvpn/contrib/alon/BETA21-userpriv-fixups

On 1/25/08, Alon Bar-Lev <alon.barlev@xxxxxxxxx> wrote:
> Thanks!
> I was not aware of the null tun.
> The following should fix the problem.
>
> -r 2677:2679 https://svn.openvpn.net/projects/openvpn/contrib/alon/BETA21-userpriv-fixups
>
> Alon.
>
> On 1/25/08, Steven Pritchard <steve@xxxxxxxxx> wrote:
> > Trying to build the Fedora package for rc6, I'm getting an error from
> > %check, which basically does this:
> >
> >   ./openvpn --config sample-config-files/loopback-client &
> >   ./openvpn --config sample-config-files/loopback-server
> >   wait
> >
> > I'm getting the following error:
> >
> >   Thu Jan 24 14:15:33 2008 /sbin/ip addr flush dev null
> >   Device "null" does not exist.
> >   Thu Jan 24 14:15:33 2008 Linux ip flush failed: shell command exited with error status: 255
> >
> > Full build log here:
> >
> >   http://koji.fedoraproject.org/koji/getfile?taskID=370966&name=build.log
> >
> > Steve
> > --
> > Steven Pritchard - K&S Pritchard Enterprises, Inc.
> > Email: steve@xxxxxxxxx             http://www.kspei.com/
> > Phone: (618)624-4440               Mobile: (618)567-7320
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Openvpn-devel mailing list
> > Openvpn-devel@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.sourceforge.net/lists/listinfo/openvpn-devel
> >
>
>
Index: openvpn/tun.c
===================================================================
--- openvpn/tun.c	(revision 2677)
+++ openvpn/tun.c	(revision 2682)
@@ -1221,17 +1221,24 @@
   if (tt)
     {
 #ifdef CONFIG_FEATURE_IPROUTE
-	char command_line[256];
-	/*
-	 * Flush IP configuration for the device
-	 */
-	openvpn_snprintf (command_line, sizeof (command_line),
-			  "%s addr flush dev %s",
+	if (tt->type != DEV_TYPE_NULL && tt->did_ifconfig)
+	  {
+	    char command_line[256];
+	    struct gc_arena gc = gc_new ();
+
+	    openvpn_snprintf (command_line, sizeof (command_line),
+			  "%s addr del dev %s local %s peer %s",
 			  iproute_path,
-			  tt->actual_name
+			  tt->actual_name,
+			  print_in_addr_t (tt->local, 0, &gc),
+			  print_in_addr_t (tt->remote_netmask, 0, &gc)
 			  );
-	msg (M_INFO, "%s", command_line);
-	system_check (command_line, NULL, S_FATAL, "Linux ip flush failed");
+
+	    msg (M_INFO, "%s", command_line);
+	    system_check (command_line, NULL, S_FATAL, "Linux ip addr del failed");
+
+	    gc_free (&gc);
+	  }
 #endif
       close_tun_generic (tt);
       free (tt);