Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Gert Doering <gert <at> greenie.muc.de>
Subject: Re: [PATCH] Add option --push-suppress-ipv6 to stop sending IPv6 info to clients.
Newsgroups: gmane.network.openvpn.devel
Date: Sunday 27th December 2015 20:58:03 UTC (over 2 years ago)
Hi,

On Sat, Dec 26, 2015 at 11:27:53PM +0100, Arne Schwabe wrote:
> > So, you asked for it, you or Arne get to review this :-) - it's
currently
> > missing a man page entry, but the commit message explains how it works
-
> > just put
> and a changlog entry :)

Done!

> >   push-remove tun-ipv6
> >   push-remove route-ipv6
> >
> > into your ccd/ file, and all options strings starting with one of these
> > strings are removed.  Caveat: "push-remove route" will remove IPv4 and
> > IPv6 routes, so to remove only IPv4 routes, use
> >
> >   push-remove 'route '
> 
> A sounds like more of a hack that anything.

A hack it is, but one that gives me the maximum flexibility with fairly
little code.  Being able to do

 push-remove 'route-ipv6 2001:'

*and*

 push-remove route

(and the latter only matching "push route" and not "push route-ipv6") is
more complicated...

[..]
> +void
> +push_remove_option (struct options *o, const char *p)
> +{
> +  msg( D_PUSH, "PUSH_REMOVE '%s'", p );
> +
> +  if (o && o->push_list.head )
> +    {
> +      struct gc_arena gc = gc_new ();
> 
> That gc is never gc'ed and is alos not used :)

Well spotted.  That's what you get for starting with a copy of another
function... :)

v2 attached.

Being able to remove "ifconfig-ipv6" from the to-be-pushed option list
was much less fun (due to the way pool and "ifconfig-ipv6-push" interact)
- but it is one of the important parts here.  Like, when we release a 
2.3.9 version which blows up when using IPv6 on XP...

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                          
//www.muc.de/~gert/
Gert Doering - Munich, Germany                            
[email protected]
fax: +49-89-35655025                       
[email protected]
 
CD: 5ms