net: nexthop: fix null pointer dereference when IPv6 is not enabled