Prevent illegal struct casting by moving AF_INET/AF_INET6 address family checks before calling ifatoia/ifatoia6.
Prevent illegal struct casting by moving AF_INET/AF_INET6 address
family checks before calling ifatoia/ifatoia6.

ok deraadt@, dlg@, mcbride@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars