Don't mis-interpret sockaddr_in6 structures as sockaddr_in structures

when purging routes.
This commit is contained in:
Brian Somers 2000-07-20 10:38:12 +00:00
parent f47d88b0b7
commit 759c81cbad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63637

View File

@ -488,7 +488,7 @@ route_IfDelete(struct bundle *bundle, int all)
for (cp = sp; cp < ep; cp += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)cp;
route_ParseHdr(rtm, sa);
if (sa[RTAX_DST]) {
if (sa[RTAX_DST] && sa[RTAX_DST]->sa_family == AF_INET) {
log_Printf(LogDEBUG, "route_IfDelete: addrs: %x, Netif: %d (%s),"
" flags: %x, dst: %s ?\n", rtm->rtm_addrs, rtm->rtm_index,
Index2Nam(rtm->rtm_index), rtm->rtm_flags,