diff options
author | Denis Ovsienko <linux@pilot.org.ua> | 2007-08-21 16:12:40 +0000 |
---|---|---|
committer | Denis Ovsienko <linux@pilot.org.ua> | 2007-08-21 16:12:40 +0000 |
commit | a13663ae74e806c3cd3d01b28b39193e550a907f (patch) | |
tree | 15a9bde3e75ec593baa7a18dab93815463a2c465 | |
parent | 6da598018c6f866694ecb80a391815a40daaa951 (diff) |
Fixed ioctl_solaris.c:if_get_mtu() for IPv6'less operation
-rw-r--r-- | zebra/ChangeLog | 6 | ||||
-rw-r--r-- | zebra/ioctl_solaris.c | 24 |
2 files changed, 16 insertions, 14 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 02eede81..abe8199b 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -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 diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c index 6e25d876..6c1c254a 100644 --- a/zebra/ioctl_solaris.c +++ b/zebra/ioctl_solaris.c @@ -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? ). |