openVPN question
Robert Watson
rwatson at freebsd.org
Thu Mar 4 10:37:38 PST 2004
On Thu, 4 Mar 2004, Juan Rodriguez Hervella wrote:
> An James Yonan said:
> > Ah, yes, that's a problem.
> >
> > The --redirect-gateway implementation needs to be able to get the IP address
> > of the current default gateway. Unfortunately the standard Berkeley sockets
> > API doesn't give us a portable way of doing this. Anyone know how to
> > do this on FreeBSD?
>
> So ? :)
Take a look at the implementation of 'route get default' in
src/sbin/route/route.c. Basically, you ask the routing socket for the
route to 0.0.0.0/0.0.0.0 (INADDR_ANY).
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Senior Research Scientist, McAfee Research
More information about the freebsd-net
mailing list