Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Selva Nair
Hi, What I have in mind would also require editing all calls to send_msg_iservice() which is essentially what Gert is objecting to. So ignore me -- a separate send_msg_iservice_ex may be the best option. Selva On Tue, Jun 25, 2019 at 5:00 PM Selva Nair wrote: > > Hi, > > On Tue, Jun 25, 2019

Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Selva Nair
Hi, On Tue, Jun 25, 2019 at 4:38 PM Lev Stipakov wrote: > > Hi, > >> >> The way interactive service structures are coded should not require >> this at all, does it? The size and message type are already in the >> header, so why do we need to pass it? > > > But we need to know the response size

Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Selva Nair
Hi On Tue, Jun 25, 2019 at 4:34 PM Gert Doering wrote: > > Hi, > > On Tue, Jun 25, 2019 at 03:57:18PM -0400, Selva Nair wrote: > > The way interactive service structures are coded should not require > > this at all, does it? The size and message type are already in the > > header, so why do we

Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Lev Stipakov
Hi, > The way interactive service structures are coded should not require > this at all, does it? The size and message type are already in the > header, so why do we need to pass it? But we need to know the response size in send_msg_iservice() since we pass it to ReadFile(). So far we assumed

Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Gert Doering
Hi, On Tue, Jun 25, 2019 at 03:57:18PM -0400, Selva Nair wrote: > The way interactive service structures are coded should not require > this at all, does it? The size and message type are already in the > header, so why do we need to pass it? The result here is a new kind of > ack message with a

Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Selva Nair
Hi On Tue, Jun 25, 2019 at 3:49 PM Gert Doering wrote: > > Hi, > > On Tue, Jun 25, 2019 at 10:34:01PM +0300, Lev Stipakov wrote: > > ack_message_t ack; > > struct gc_arena gc = gc_new(); > > > > -if (!send_msg_iservice(pipe, rt, size, , "ROUTE")) > > +if

Re: [Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Gert Doering
Hi, On Tue, Jun 25, 2019 at 10:34:01PM +0300, Lev Stipakov wrote: > ack_message_t ack; > struct gc_arena gc = gc_new(); > > -if (!send_msg_iservice(pipe, rt, size, , "ROUTE")) > +if (!send_msg_iservice(pipe, rt, size, , sizeof(ack), "ROUTE")) I do not like this. Please find

[Openvpn-devel] [PATCH] openvpnserv: enable interactive service to open tun

2019-06-25 Thread Lev Stipakov
From: Lev Stipakov This patch enables interactive service to open tun device. This is mostly needed by Wintun, which could be opened only by privileged process. When interactive service is used, instead of calling CreateFile() directly by openvpn process we pass tun device path into service