Dynamic enable ip version

This PR should get slimmer once the other has been merged.