[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

Re: [Openvpn-devel] Changing routes on the client

  • Subject: Re: [Openvpn-devel] Changing routes on the client
  • From: Eric Limpens <eric@xxxxxxxxxxx>
  • Date: Wed, 26 Apr 2006 10:21:43 +0200

On Tue, 25 Apr 2006 17:17:27 +0200
Eric Limpens <eric@xxxxxxxxxxx> wrote:

> Digging thru the sources, I've found a more convenient way by adding a
> new flag to the redirect-gateway option.
> When set, it uses 'add_route3' to re-route all (local) traffic to the 
> remote endpoint: 
> add_route3(0xc08a0500, 0xffffff00, rl->spec.rmote_endpoint, tt,
> flags, es)
> However the 2 first parameters should be determined by the os.. For
> testing purposes I've hardcoded them, things work as expected.
> My question: does anyone have pointers how to obtain the local-net
> and netmask?

Anyone to enlighten me?

It appears the rl->spec.net_gateway is the original gateway and 
rl->spec.remote_endpoint is the address I'ld like to route all
traffic to.

I'm still missing the netmask for the original network. Is there
an easy way to retrieve this?

OpenVPN mailing lists