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 <[email protected]> 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 <[email protected]> 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: [email protected] 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
> > [email protected]
> > 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);