From patchwork Thu Nov 21 18:07:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "stipa (Code Review)" X-Patchwork-Id: 3955 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1b0d:b0:5db:37e7:e801 with SMTP id cv13csp501382mab; Thu, 21 Nov 2024 10:08:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUQF/UnM7ehGVT5HmrxmkPoEs7tUU7qeV/5L6qImr2lx4bRq3mSRfJufTk/rTZPB6xtR2SEi8kXS2A=@openvpn.net X-Google-Smtp-Source: AGHT+IEH2s6muX5Hjsiw1S6EpUgYiDGDzCitH3c+sbITno7CmxOWDaNo4WCHnGXbKPrKAJ0Jl8ou X-Received: by 2002:a05:6830:4997:b0:718:18d6:a45d with SMTP id 46e09a7af769-71ab319b4e4mr8562209a34.19.1732212501252; Thu, 21 Nov 2024 10:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732212501; cv=none; d=google.com; s=arc-20240605; b=P9QpuU0ZgSA3TK97YYBgJezmMuEcubbpc5qQq+zW5djLCTad0RKEb+f0BwYdBinffx nMQyPWUDnRBlU0x3UGrgoRiAMGcCll13mqTceI5XlRC0/Q/FBJc8I6zWOTyNfQbvgdkn Ge0qB/8e3znPCfFb9KWZy1G5VXOqnL61jKqnZJoOrox6TmFte24RMTKyZbeHmMxQ8X7f zLFIYKrr87aZ140l2uBN6AbGFpfAkTWwWTXWhmcYL6qtO5MkMv3V8ebC0XBGuxo6umd2 oAhoTwANxkbjwhIGxQIItyCzNhta9mCSIRbiY6DvxHHpaoz2ULXtAktJTyicnGK92qH0 np+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=JoJbSdlXyt5GzDbxQ1z3vKdSYazhmmnoGS2rHkZK1KY=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=IapSoZjN+Ydbk480ryN0wrbWJKRmEv7r81guT2dzqeAus9u+qIFWmm78mKAAODGVSF 2syGIPaG10EbBojtseUjT7OgDEYC/b5N9z6T4RD7Uxv0/XoxT2vwFJpp8hlrEbd4dm7/ LCU5sRX/aR0wdS6o6Na7BkcRTfKJRVtPXNGaRLnV2bD0zzAKFY22W+bZPKw9iiNqAz+Y iIlVfjsnCK+oPe5XEHnsDqbN/COTH+ewh3IDUH4Yh4byoScxw1A0c/6iaRVDLQSZVoud /eNn2HhaUUUMnff+rWhmzQMpEn1uJtLupGXYVOGQyUtZKREvFrN1iL8XjuZlr986uMyF SYkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kcfAfZ8o; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=KApiX5Xu; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=aZfrGTd8; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-71c0384e952si92533a34.320.2024.11.21.10.08.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2024 10:08:21 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kcfAfZ8o; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=KApiX5Xu; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=aZfrGTd8; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tEBbA-0007V6-TE; Thu, 21 Nov 2024 18:08:12 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tEBb7-0007Us-Ro for openvpn-devel@lists.sourceforge.net; Thu, 21 Nov 2024 18:08:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=l7IIbid3prtb+f1gyXfb/WQ+FEnuPtxvitUwVGozfc8=; b=kcfAfZ8oKPIqr8A0kdSNCfH72b GEgQjMsHg5kZTPC8mD5VE7mguNxPeog0hhazf1O/jZr2xwScOOkSMFcXKLpVuA6ZcZAF3d4M9hvTR xLAZ0Q29GfyzP0SE6P/nj30zcHQem47POHyRxv3ZAmMiMASGRcdFF2ZyVi3uRWnlqqEE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=l7IIbid3prtb+f1gyXfb/WQ+FEnuPtxvitUwVGozfc8=; b=K ApiX5Xup811t7X3qq5ANKrHZKI4Er+wDbdI4+krdUYFNOWupS0rVrSfd7M0wJAIS8cMudqmzH9r2D jZCkdzGAYtAkUVbgEAm8uMID/lp0/czr4eUT/lj6MaPKWfOfqjmto2IZ7g5+1M9MKgSFxdyYMBHp8 xMwxYLJvfcbh/uOc=; Received: from mail-wr1-f52.google.com ([209.85.221.52]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1tEBb5-0004Sx-T9 for openvpn-devel@lists.sourceforge.net; Thu, 21 Nov 2024 18:08:09 +0000 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38241435528so800886f8f.2 for ; Thu, 21 Nov 2024 10:08:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1732212479; x=1732817279; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=l7IIbid3prtb+f1gyXfb/WQ+FEnuPtxvitUwVGozfc8=; b=aZfrGTd8ywHfFE9nmuv8MjbhNV1z4fZ99+DuBmpz1Di/CNyzdP+XUL67BqKV0Du1CB nUPN3pzi4oNQqn1nQrp6ZxYZvT966ozjxcOpDEEFi1DnxwSdsdp7hPEErgGoLPS8Rz5e n4doxhYmEQLrJft3mvwqdmTPuExLL7bZ/XwEOhaLA0IUoCmUBc26YyJ7/4cLSzzyQjL5 vU4H/K2aAl28321ulxwaHVNdK7p6k+bqTFIiL8ohZ0ZtBgCJvEVs9agZ+W7/VoXxcda8 3UBT93694PNWuyXZ+tdk3hNsRL/OFeI8eEH6b+7c7hSWWmckO5+pOZ2D9bTrAEvtL78y plEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732212479; x=1732817279; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l7IIbid3prtb+f1gyXfb/WQ+FEnuPtxvitUwVGozfc8=; b=fcDyVmfZM2M/EX5WjRZseD4+Yqbdcx0SDYfAXVNByxucCo0f9zcheT9wqytieFZdOp /L8RexEikH2eqzsCOJeQCss30P6Eq1xNwSm2+MBnDnrJnhhceVPvQ3KrEViGnzUIk3FP /12XmoO8FAWb6Ynh6mHrUYrcBo4/B+EJHT7UAvtSpdG5qBGcCv7Zfwqhd2K2F0o4lta/ 0z0xcnRGDWsyM0RrSgbl0CC2HYmnm1T1jhNt53UXn/2SDNN6IAJTpm0O6UA4pRSzscU1 jyDjDucbgPZLr5lxvuSLYwTdG981mB7o/kBaSCFUxBDmTGB2z3Q2RNwtn8wpecIq+9d3 kdwg== X-Gm-Message-State: AOJu0Yxvse+lsN0mOjoz3OaMLE7QAt4Ex63cfPFuOWV+wqXgaYcXf8Li HvqbRUOcfkUuVrodd3xPSFLmFcHRQtpoAE+UhatGLDQnXa0y38eMMghDxPphEVr0rw3dc1zKSf8 y X-Gm-Gg: ASbGnct9wsh3qOzkvaFGVJ1iPFIYblr+PQu+QinU9FCNzlRh6V5pZeFp6Nrfw5ZkD1A 7LvoX56xe8sqPzfMRzM3TYV1qD7Z3/WDB+SXUbpy7jrFjrzXCH7lEpmkYwbKZtzuoq6SjimqJ9H LCsGrZrptClF4V3YVsL+G5w2mvxFHY/SQRj9tZsX0TriohHo0bJXKv5uMSWaHfBTVJdHwllI4M2 pvGwl30G/QBenxnzXiKIJr4rbQu1ypLbZ/lqg1PPCJ5NtZdUXMjY55sTAPLsDnnyFnMVt5Spboh ldW/0ehYXmPMi2+wPrs43kWkWB6ERcwwcXD/wDvs9Q== X-Received: by 2002:a5d:6da5:0:b0:382:1e06:fb0 with SMTP id ffacd0b85a97d-38260bf5808mr4389f8f.56.1732212479257; Thu, 21 Nov 2024 10:07:59 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fafe98asm191859f8f.39.2024.11.21.10.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 10:07:58 -0800 (PST) From: "stipa (Code Review)" X-Google-Original-From: "stipa (Code Review)" X-Gerrit-PatchSet: 1 Date: Thu, 21 Nov 2024 18:07:58 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Iedc10616225f6769c66d3c29d4a462b622ebbc6e X-Gerrit-Change-Number: 816 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: f644e5a589255db71aa36cd7c49da06df565fdc6 References: Message-ID: <9bf069abf30837051fe449c2b42c8083da4b822e-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.221.52 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.221.52 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.52 listed in wl.mailspike.net] 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1tEBb5-0004Sx-T9 Subject: [Openvpn-devel] [M] Change in openvpn[master]: dco-win: kernel notifications X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: lstipakov@gmail.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1816356455647892514?= X-GMAIL-MSGID: =?utf-8?q?1816356455647892514?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/816?usp=email to review the following change. Change subject: dco-win: kernel notifications ...................................................................... dco-win: kernel notifications The driver supports notifications mechanism, which is used to notify userspace about various events, such as peer keepalive timeout, key expire and so on. This uses existing framework of subscribing and receiving dco notifications, used by FreeBSD and Linux implementations. On Windows we use overlapped IO, which state we keep in DCO context. We create an event, which is associated with overlapped operation, and inject it into openvpn event loop. When event is signalled, we read overlapped result into DCO context, which is later used by already existing code which handles peer deletion. Change-Id: Iedc10616225f6769c66d3c29d4a462b622ebbc6e Signed-off-by: Lev Stipakov --- M src/openvpn/dco_win.c M src/openvpn/dco_win.h M src/openvpn/forward.c M src/openvpn/mudp.c M src/openvpn/multi.c 5 files changed, 124 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/16/816/1 diff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c index 7be6fdb..702b4bf 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -136,6 +136,17 @@ return true; } + /* Use manual reset event so it remains signalled until + * explicitly reset. This way we won't lose notifications + */ + dco->ov.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (dco->ov.hEvent == NULL) + { + msg(M_ERR, "Error: ovpn_dco_init: CreateEvent failed"); + } + + dco->rwhandle.read = dco->ov.hEvent; + /* open DCO device */ struct gc_arena gc = gc_new(); const char *device_guid; @@ -690,11 +701,63 @@ } } +static void +dco_handle_overlapped_success(dco_context_t *dco, bool queued) +{ + DWORD bytes_read = 0; + BOOL res = GetOverlappedResult(dco->tt->hand, &dco->ov, &bytes_read, FALSE); + if (res) + { + msg(D_DCO_DEBUG, "%s: completion%s success [%ld]", __func__, queued ? "" : " non-queued", bytes_read); + + dco->dco_message_peer_id = dco->notif_buf.PeerId; + dco->dco_message_type = dco->notif_buf.Cmd; + dco->dco_del_peer_reason = dco->notif_buf.DelPeerReason; + } + else + { + msg(D_DCO_DEBUG | M_ERRNO, "%s: completion%s error", __func__, queued ? "" : " non-queued"); + } +} + int dco_do_read(dco_context_t *dco) { - /* no-op on windows */ - ASSERT(0); + if (dco->mode != dco_mode_mp) + { + ASSERT(false); + } + + dco->dco_message_peer_id = -1; + dco->dco_message_type = 0; + + switch (dco->iostate) + { + case IOSTATE_QUEUED: + dco_handle_overlapped_success(dco, true); + + ASSERT(ResetEvent(dco->ov.hEvent)); + dco->iostate = IOSTATE_INITIAL; + + break; + + case IOSTATE_IMMEDIATE_RETURN: + dco->iostate = IOSTATE_INITIAL; + ASSERT(ResetEvent(dco->ov.hEvent)); + + if (dco->ov_ret == ERROR_SUCCESS) + { + dco_handle_overlapped_success(dco, false); + } + else + { + SetLastError(dco->ov_ret); + msg(D_DCO_DEBUG | M_ERRNO, "%s: completion non-queued error", __func__); + } + + break; + } + return 0; } @@ -737,8 +800,48 @@ void dco_event_set(dco_context_t *dco, struct event_set *es, void *arg) { - /* no-op on windows */ - ASSERT(0); + if (dco->mode != dco_mode_mp) + { + /* mp only */ + return; + } + + event_ctl(es, &dco->rwhandle, EVENT_READ, arg); + + if (dco->iostate == IOSTATE_INITIAL) + { + /* the overlapped IOCTL will signal this event on I/O completion */ + ASSERT(ResetEvent(dco->ov.hEvent)); + + if (!DeviceIoControl(dco->tt->hand, OVPN_IOCTL_NOTIFY_EVENT, NULL, 0, &dco->notif_buf, sizeof(dco->notif_buf), NULL, &dco->ov)) + { + DWORD err = GetLastError(); + if (err == ERROR_IO_PENDING) /* operation queued? */ + { + dco->iostate = IOSTATE_QUEUED; + dco->ov_ret = ERROR_SUCCESS; + + msg(D_DCO_DEBUG, "%s: notify ioctl queued", __func__); + } + else + { + /* error occured */ + ASSERT(SetEvent(dco->ov.hEvent)); + dco->iostate = IOSTATE_IMMEDIATE_RETURN; + dco->ov_ret = err; + + msg(D_DCO_DEBUG | M_ERRNO, "%s: notify ioctl error", __func__); + } + } + else + { + ASSERT(SetEvent(dco->ov.hEvent)); + dco->iostate = IOSTATE_IMMEDIATE_RETURN; + dco->ov_ret = ERROR_SUCCESS; + + msg(D_DCO_DEBUG, "%s: notify ioctl immediate return", __func__); + } + } } const char * diff --git a/src/openvpn/dco_win.h b/src/openvpn/dco_win.h index 3e1c2f3..65c5d26 100644 --- a/src/openvpn/dco_win.h +++ b/src/openvpn/dco_win.h @@ -41,6 +41,18 @@ struct tuntap *tt; dco_mode_type mode; + OVPN_NOTIFY_EVENT notif_buf; /**< Buffer for incoming notifications. */ + OVERLAPPED ov; /**< Used by overlapped I/O for async IOCTL. */ + int iostate; /**< State of overlapped I/O; see definitions in win32.h. */ + struct rw_handle rwhandle; /**< Used to hook async I/O to the OpenVPN event loop. */ + int ov_ret; /**< Win32 error code for overlapped operation, 0 for success */ + + int dco_message_peer_id; + int dco_message_type; + int dco_del_peer_reason; + + uint64_t dco_read_bytes; + uint64_t dco_write_bytes; }; typedef struct dco_context dco_context_t; diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 0a3936a..6468011 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -2076,8 +2076,8 @@ #ifdef ENABLE_ASYNC_PUSH static uintptr_t file_shift = FILE_SHIFT; #endif -#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) - static uintptr_t dco_shift = DCO_SHIFT; /* Event from DCO linux kernel module */ +#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) || defined(TARGET_WIN32) + static uintptr_t dco_shift = DCO_SHIFT; /* Event from DCO kernel module */ #endif /* @@ -2187,7 +2187,7 @@ socket_set(c->c2.link_socket, c->c2.event_set, socket, &c->c2.link_socket->ev_arg, NULL); tun_set(c->c1.tuntap, c->c2.event_set, tuntap, (void *)tun_shift, NULL); -#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) +#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) || defined(TARGET_WIN32) if (socket & EVENT_READ && c->c2.did_open_tun) { dco_event_set(&c->c1.tuntap->dco, c->c2.event_set, (void *)dco_shift); diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c index d8e3d69..959d0a2 100644 --- a/src/openvpn/mudp.c +++ b/src/openvpn/mudp.c @@ -404,7 +404,7 @@ multi_process_file_closed(m, mpp_flags); } #endif -#if defined(ENABLE_DCO) && (defined(TARGET_LINUX) || defined(TARGET_FREEBSD)) +#if defined(ENABLE_DCO) && (defined(TARGET_LINUX) || defined(TARGET_FREEBSD) || defined(TARGET_WIN32)) else if (status & DCO_READ) { if (!IS_SIG(&m->top)) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 45b3cfa..6ebf573 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3219,7 +3219,7 @@ } #endif -#if defined(ENABLE_DCO) && (defined(TARGET_LINUX) || defined(TARGET_FREEBSD)) +#if defined(ENABLE_DCO) && (defined(TARGET_LINUX) || defined(TARGET_FREEBSD) || defined(TARGET_WIN32)) static void process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, dco_context_t *dco)