Re: [Openvpn-devel] do not push route-ipv6 entries that are also in the iroute-ipv6 list

2022-06-28 Thread Antonio Quartulli

Hi,

On 27/06/2022 23:52, Heiko Hund wrote:

On Mittwoch, 23. Mai 2018 21:28:02 CEST Antonio Quartulli wrote:

-if (o && o->push_list.head && o->iroutes)
+if (o && o->push_list.head && (o->iroutes || o->iroutes_ipv6))

[...]

+else if (p[0] && !strcmp(p[0], "route-ipv6") && !p[2])


I think it would make sense to check for o->iroutes_ipv6 here again, so that
the address string parsing only happens if there's v6 iroute(s). And then also
add a check for o->iroutes to the "route" if statement above. That might save
a few cycles, but no big issue.


Yeah, I think it makes sense. v2 incoming!

Cheers,



Besides that: ACK

Heiko




___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel



--
Antonio Quartulli


___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


Re: [Openvpn-devel] do not push route-ipv6 entries that are also in the iroute-ipv6 list

2022-06-27 Thread Heiko Hund
On Mittwoch, 23. Mai 2018 21:28:02 CEST Antonio Quartulli wrote: 
> -if (o && o->push_list.head && o->iroutes)
> +if (o && o->push_list.head && (o->iroutes || o->iroutes_ipv6))
[...]
> +else if (p[0] && !strcmp(p[0], "route-ipv6") && !p[2])

I think it would make sense to check for o->iroutes_ipv6 here again, so that 
the address string parsing only happens if there's v6 iroute(s). And then also 
add a check for o->iroutes to the "route" if statement above. That might save 
a few cycles, but no big issue.

Besides that: ACK

Heiko




___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel