aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_stf.c
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2006-06-29 19:22:05 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2006-06-29 19:22:05 +0000
commit4b97d7affdd156d0f669720e69acb4893302fdb1 (patch)
tree3d6a9cdea9fbb33471c0beed7b40c5ae89e5a37c /sys/net/if_stf.c
parente54e7d6daebccef75827ff3ac4cbace310811323 (diff)
downloadsrc-4b97d7affdd156d0f669720e69acb4893302fdb1.tar.gz
src-4b97d7affdd156d0f669720e69acb4893302fdb1.zip
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
Notes
Notes: svn path=/head/; revision=160038
Diffstat (limited to 'sys/net/if_stf.c')
-rw-r--r--sys/net/if_stf.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index 23f51cc219f5..594b648a606c 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;