Use IPv6 subnet mask calculation as suggested by @andi-bigswitch

Reference:
https://github.com/ronaldchl/loxigen/commit/fea1789f36d0edba5cf991ff0a953e9ef445f078#commitcomment-6923088