diff options
author | yar <yar@FreeBSD.org> | 2006-06-29 19:22:05 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2006-06-29 19:22:05 +0000 |
commit | ba19b1ecd4d6f2950416c0596e5007ae8ffb5360 (patch) | |
tree | 3d6a9cdea9fbb33471c0beed7b40c5ae89e5a37c /sys/net/if_stf.c | |
parent | fb752eb168e0c0461ca9c98b0c8452c4d96ec4a7 (diff) | |
download | FreeBSD-src-ba19b1ecd4d6f2950416c0596e5007ae8ffb5360.zip FreeBSD-src-ba19b1ecd4d6f2950416c0596e5007ae8ffb5360.tar.gz |
There is a consensus that ifaddr.ifa_addr should never be NULL,
except in places dealing with ifaddr creation or destruction; and
in such special places incomplete ifaddrs should never be linked
to system-wide data structures. Therefore we can eliminate all the
superfluous checks for "ifa->ifa_addr != NULL" and get ready
to the system crashing honestly instead of masking possible bugs.
Suggested by: glebius, jhb, ru
Diffstat (limited to 'sys/net/if_stf.c')
-rw-r--r-- | sys/net/if_stf.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 23f51cc..594b648 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -368,8 +368,6 @@ stf_getsrcifa6(ifp) struct in_addr in; TAILQ_FOREACH(ia, &ifp->if_addrlist, ifa_list) { - if (ia->ifa_addr == NULL) - continue; if (ia->ifa_addr->sa_family != AF_INET6) continue; sin6 = (struct sockaddr_in6 *)ia->ifa_addr; |