Hi, > Good point. I have a version that splits "add" and "delete" actions into > separate functions and does something like this. > > Please take a look here: > https://github.com/selvanair/openvpn/tree/block-dns-fix > The add and delete functions are in that order (with a forward declaration) > only to make review easier (less changes with ignore-all-spaces), will move > the latter up if it looks okay.
Looks good to me, especially without whitespaces https://github.com/OpenVPN/openvpn/pull/235/files?diff=unified&w=1 > That said, if you have a better fix, I'm ready to review it in lieu of this. My change is more intrusive, idea is to bail out if get_interface_metrics fails and update undo_list only if both filters and metrics are applied, https://github.com/lstipakov/openvpn/commit/8c2d0de178e0771295764ea773596c13ff5f2aa6 It is a bit sloppy on metrics cleanup, though - for example if get_interface_metric for ipv6 fails but ipv4 is not - it won't restore ipv4 metrics. On the other hand this is unlikely to happen. Also I replaced 0x%x with %u in win_block_dns_service() for consistency. You may want to do it in your patch too :) -- -Lev _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel