Fixed ioctl_solaris.c:if_get_mtu() for IPv6'less operation

This commit is contained in:
Denis Ovsienko 2007-08-21 16:12:40 +00:00
parent 6da598018c
commit a13663ae74
2 changed files with 16 additions and 14 deletions

View File

@ -1,3 +1,9 @@
2007-08-21 Denis Ovsienko
* ioctl_solaris.c: (if_get_mtu) Don't break things if either
IPv6 was disabled at compile time or the current interface
hasn't it enabled.
2007-08-17 Denis Ovsienko 2007-08-17 Denis Ovsienko
* kernel_socket.c: (rtm_read) Ignore any routing socket messages * kernel_socket.c: (rtm_read) Ignore any routing socket messages

View File

@ -176,13 +176,8 @@ if_get_mtu (struct interface *ifp)
} }
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
if ((ifp->flags & IFF_IPV6) == 0) if (ifp->flags & IFF_IPV6)
{ {
if (changed)
zebra_interface_up_update(ifp);
return;
}
memset(&lifreq, 0, sizeof(lifreq)); memset(&lifreq, 0, sizeof(lifreq));
lifreq_set_name (&lifreq, ifp->name); lifreq_set_name (&lifreq, ifp->name);
@ -197,10 +192,11 @@ if_get_mtu (struct interface *ifp)
ifp->mtu6 = lifreq.lifr_metric; ifp->mtu6 = lifreq.lifr_metric;
changed = 1; changed = 1;
} }
}
#endif /* HAVE_IPV6 */
if (changed) if (changed)
zebra_interface_up_update(ifp); zebra_interface_up_update(ifp);
#endif /* HAVE_IPV6 */
} }
/* Set up interface's address, netmask (and broadcast? ). /* Set up interface's address, netmask (and broadcast? ).