mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 23:42:27 +00:00
Fixed ioctl_solaris.c:if_get_mtu() for IPv6'less operation
This commit is contained in:
parent
6da598018c
commit
a13663ae74
@ -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
|
||||
|
||||
* kernel_socket.c: (rtm_read) Ignore any routing socket messages
|
||||
|
@ -176,31 +176,27 @@ if_get_mtu (struct interface *ifp)
|
||||
}
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
if ((ifp->flags & IFF_IPV6) == 0)
|
||||
{
|
||||
if (changed)
|
||||
zebra_interface_up_update(ifp);
|
||||
return;
|
||||
}
|
||||
|
||||
memset(&lifreq, 0, sizeof(lifreq));
|
||||
lifreq_set_name (&lifreq, ifp->name);
|
||||
if (ifp->flags & IFF_IPV6)
|
||||
{
|
||||
memset(&lifreq, 0, sizeof(lifreq));
|
||||
lifreq_set_name (&lifreq, ifp->name);
|
||||
|
||||
ret = AF_IOCTL (AF_INET6, SIOCGLIFMTU, (caddr_t) & lifreq);
|
||||
if (ret < 0)
|
||||
ret = AF_IOCTL (AF_INET6, SIOCGLIFMTU, (caddr_t) & lifreq);
|
||||
if (ret < 0)
|
||||
{
|
||||
zlog_info ("Can't lookup mtu6 on %s by ioctl(SIOCGIFMTU)", ifp->name);
|
||||
ifp->mtu6 = -1;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
ifp->mtu6 = lifreq.lifr_metric;
|
||||
changed = 1;
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* HAVE_IPV6 */
|
||||
|
||||
if (changed)
|
||||
zebra_interface_up_update(ifp);
|
||||
#endif /* HAVE_IPV6 */
|
||||
}
|
||||
|
||||
/* Set up interface's address, netmask (and broadcast? ).
|
||||
|
Loading…
Reference in New Issue
Block a user