Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 243209 Details for
Bug 332991
net-misc/openvpn-2.1.0 fails to reconnect if down-root plugin is being used
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for plugin down-root.so
openvpn-2.1.0-downroot.patch (text/plain), 1.91 KB, created by
Rumi Szabolcs
on 2010-08-16 12:21:59 UTC
(
hide
)
Description:
patch for plugin down-root.so
Filename:
MIME Type:
Creator:
Rumi Szabolcs
Created:
2010-08-16 12:21:59 UTC
Size:
1.91 KB
patch
obsolete
>--- plugin/down-root/down-root.c.orig 2009-12-11 00:35:04.000000000 +0100 >+++ plugin/down-root/down-root.c 2010-08-16 13:44:45.754293154 +0200 >@@ -44,12 +44,14 @@ > /* Command codes for foreground -> background communication */ > #define COMMAND_RUN_SCRIPT 0 > #define COMMAND_EXIT 1 >+#define COMMAND_PING 2 > > /* Response codes for background -> foreground communication */ > #define RESPONSE_INIT_SUCCEEDED 10 > #define RESPONSE_INIT_FAILED 11 > #define RESPONSE_SCRIPT_SUCCEEDED 12 > #define RESPONSE_SCRIPT_FAILED 13 >+#define RESPONSE_PING_REQUEST 14 > > /* Background process function */ > static void down_root_server (const int fd, char *command, const char *argv[], const char *envp[], const int verb); >@@ -388,6 +390,28 @@ > return 0; /* NOTREACHED */ > } > } >+ else if (type == OPENVPN_PLUGIN_UP && context->foreground_fd >= 0) /* no need to fork a second process */ >+ { >+ >+ /* Check process communication */ >+ >+ if (send_control (context->foreground_fd, COMMAND_PING) == -1) >+ { >+ fprintf (stderr, "DOWN-ROOT: Error sending ping request signal to background process\n"); >+ } >+ else >+ { >+ const int status = recv_control (context->foreground_fd); >+ if (status == RESPONSE_PING_REQUEST) >+ { >+ return OPENVPN_PLUGIN_FUNC_SUCCESS; >+ } >+ else >+ { >+ fprintf (stderr, "DOWN-ROOT: Error receiving ping reception confirmation from background process\n"); >+ } >+ } >+ } > else if (type == OPENVPN_PLUGIN_DOWN && context->foreground_fd >= 0) > { > if (send_control (context->foreground_fd, COMMAND_RUN_SCRIPT) == -1) >@@ -527,6 +551,15 @@ > } > break; > >+ case COMMAND_PING: /* allows to check if process is listening */ >+ >+ if (send_control (fd, RESPONSE_PING_REQUEST) == -1) >+ { >+ fprintf (stderr, "DOWN-ROOT: BACKGROUND: write error on response socket [4]\n"); >+ goto done; >+ } >+ break; >+ > case COMMAND_EXIT: > goto done; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 332991
: 243209 |
243211