Simplify ifreq_setaddr:
commit1dd9d452c5024f35f76c848d652063b9ddb66f47
authorJoerg Sonnenberger <joerg@NetBSD.org>
Fri, 13 Nov 2009 23:11:08 +0000 (13 23:11 +0000)
committerJoerg Sonnenberger <joerg@NetBSD.org>
Fri, 13 Nov 2009 23:11:08 +0000 (13 23:11 +0000)
tree7d992e1c289d1d9c7c8e0c0a8f7923cde96d68f3
parent7167f441f497e6305cf2049b8112393f31600ab0
Simplify ifreq_setaddr:
- Drop the INET6 block. The commands are never given to this function
  and truncating the sockaddr is arguably not the desired result anyway.
- Clear the address before copying. This fixes SIOCGIFNETMASK and possible
  other ioctls for users that don't check sa_len. This includes
  COMPAT_43 and Linux emulation.

OK dyoung@
sys/net/if.c