Skip to content

Commit 02974c3

Browse files
Fix IPv6 support (#60)
1 parent 8d23052 commit 02974c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

duo_openvpn.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ auth_user_pass_verify(struct context *ctx, const char *args[], const char *envp[
5555
username = get_env("common_name", envp);
5656
password = get_env("password", envp);
5757
ipaddr = get_env("untrusted_ip", envp);
58+
if (ipaddr == NULL) {
59+
/* If untrusted_ip is not set, use untrusted_ip6 because it must be using IPv6 */
60+
ipaddr = get_env("untrusted_ip6", envp);
61+
}
5862

5963
if (!control || !username || !password || !ipaddr) {
6064
return OPENVPN_PLUGIN_FUNC_ERROR;

0 commit comments

Comments
 (0)