Yes, I think that using a `bool ipv6 = false` parameter is better than duplicating function code to have _v4 and _v6 variants in general.