summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-12-13 15:44:15 +0000
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-12-13 15:44:15 +0000
commitfb6724a6b987cb6fab00cc9326674bd14a0d09fa (patch)
tree55a8ad856112d2bb9904375a236542046f950b7a /zebra
parente4529636b77124285cca96a62799d0ff6a7addeb (diff)
[zebra] For solaris IPv6 PtP interfaces, try to support prefixlen != 128
2006-12-13 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * if_ioctl_solaris.c: (if_get_addr) For IPv6, stop assuming that all IFF_POINTOPOINT have prefixlen of IPV6_MAX_BITLEN. Instead, always try the SIOCGLIFSUBNET ioctl; if that fails, then we fall back to IPV6_MAX_BITLEN for PtP interfaces.
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog7
-rw-r--r--zebra/if_ioctl_solaris.c27
2 files changed, 18 insertions, 16 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 6b50cf0f..4139e859 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,10 @@
+2006-12-13 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * if_ioctl_solaris.c: (if_get_addr) For IPv6, stop assuming
+ that all IFF_POINTOPOINT have prefixlen of IPV6_MAX_BITLEN.
+ Instead, always try the SIOCGLIFSUBNET ioctl; if that fails,
+ then we fall back to IPV6_MAX_BITLEN for PtP interfaces.
+
2006-12-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* connected.c: (connected_up_ipv4, connected_down_ipv4,
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index 4cb16c7f..4267a424 100644
--- a/zebra/if_ioctl_solaris.c
+++ b/zebra/if_ioctl_solaris.c
@@ -309,23 +309,18 @@ if_get_addr (struct interface *ifp, struct sockaddr *addr, const char *label)
#ifdef HAVE_IPV6
else if (af == AF_INET6)
{
- if (ifp->flags & IFF_POINTOPOINT)
- {
- prefixlen = IPV6_MAX_BITLEN;
- }
+ if (if_ioctl_ipv6 (SIOCGLIFSUBNET, (caddr_t) & lifreq) < 0)
+ {
+ if (ifp->flags & IFF_POINTOPOINT)
+ prefixlen = IPV6_MAX_BITLEN;
+ else
+ zlog_warn ("SIOCGLIFSUBNET (%s) fail: %s",
+ ifp->name, safe_strerror (errno));
+ }
else
- {
- ret = if_ioctl_ipv6 (SIOCGLIFSUBNET, (caddr_t) & lifreq);
- if (ret < 0)
- {
- zlog_warn ("SIOCGLIFSUBNET (%s) fail: %s",
- ifp->name, safe_strerror (errno));
- }
- else
- {
- prefixlen = lifreq.lifr_addrlen;
- }
- }
+ {
+ prefixlen = lifreq.lifr_addrlen;
+ }
}
#endif /* HAVE_IPV6 */