Re: [PATCH] Multiple search domains in OpenVPN



On Sat, 2013-03-16 at 03:55 +0400, Vsevolod Velichko wrote:
Hello all,

I'm widely using OpenVPN and recently found that network-manager-openvpn
plugin just ignores all but first search domains it has to send to NM.

I wrote a little patch, that obviously fixes the issue, however I'm not
familiar with the libglib API at all, so it would be nice if someone check
whether I put all frees correctly or not (when I wrote it, it wasn't
obvious to me, how to deal with string arrays in glib and who controls each
item at the moment).

The second tiny patch is the patch for network-manager itself, it just
fixes the logging of search domains: while they are received correctly,
only the first one was logged.

For the second patch, three things if you don't mind:

1) let's just make 'dns_domain' a 'const char *'; there's no reason it
was a 'char *' before except perhaps historical ones

2) also, skip the "none" printing parts; if the domains aren't logged
then they weren't sent, which is consistent with the rest of the options
there.  So you can skip the if (num > 0) check entirely.

3) Last, in the IPv6 code, you've got "priv->ip4_config" which I'll
assume is a copy & paste error :)

Thanks!
Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]