diff options
author | paul <paul> | 2003-09-29 19:54:53 +0000 |
---|---|---|
committer | paul <paul> | 2003-09-29 19:54:53 +0000 |
commit | 31a476c7e9014aa81dc0d50b4100431ab111bf3f (patch) | |
tree | 3f7fd8ed9010917cb3e93389d4e1d5a9649c5741 /zebra | |
parent | f3e05cda2a35abe1bcd9e3ad33083f4c78c0235a (diff) |
2003-09-29 Paul Jakma <paul@dishone.st>
* zebra/connected.c: revert the 'generic PtP' patch as it causes
far too many problems. People who use FreeSWAN should investigate
native linux ipsec.
* zebra/rt_netlink.c: ditto
* lib/if.c: ditto
* ripd/ripd.h: ditto
* ripd/ripd.c: ditto
* ripd/rip_interface.c: ditto
* ospfd/ospfd.c: ditto
* ospfd/ospf_snmp.c: ditto
* bgpd/bgp_nexthop.c: ditto
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/connected.c | 8 | ||||
-rw-r--r-- | zebra/rt_netlink.c | 60 |
2 files changed, 34 insertions, 34 deletions
diff --git a/zebra/connected.c b/zebra/connected.c index 280e423e..1d19258f 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -69,7 +69,7 @@ connected_up_ipv4 (struct interface *ifp, struct connected *ifc) p.prefixlen = addr->prefixlen; /* Point-to-point check. */ - if (ifc_pointopoint (ifc) && dest) + if (if_is_pointopoint (ifc) && dest) p.prefix = dest->prefix; else p.prefix = addr->prefix; @@ -163,7 +163,7 @@ connected_down_ipv4 (struct interface *ifp, struct connected *ifc) p.prefixlen = addr->prefixlen; /* Point-to-point check. */ - if (dest && ifc_pointopoint (ifc)) + if (dest && if_is_pointopoint (ifc)) p.prefix = dest->prefix; else p.prefix = addr->prefix; @@ -250,7 +250,7 @@ connected_up_ipv6 (struct interface *ifp, struct connected *ifc) p.family = AF_INET6; p.prefixlen = addr->prefixlen; - if (ifc_pointopoint (ifc) && dest) + if (if_is_pointopoint (ifp) && dest) { if (IN6_IS_ADDR_UNSPECIFIED (&dest->prefix)) p.prefix = addr->prefix; @@ -343,7 +343,7 @@ connected_down_ipv6 (struct interface *ifp, struct connected *ifc) p.family = AF_INET6; p.prefixlen = addr->prefixlen; - if (ifc_pointopoint (ifc) && dest) + if (if_is_pointopoint (ifp) && dest) { if (IN6_IS_ADDR_UNSPECIFIED (&dest->prefix)) p.prefix = addr->prefix; diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index a2efa17a..02cae6ee 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -487,7 +487,6 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h) void *broad = NULL; u_char flags = 0; char *label = NULL; - int peeronly = 0; ifa = NLMSG_DATA (h); @@ -539,40 +538,41 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h) if (tb[IFA_LABEL] && strcmp (ifp->name, RTA_DATA (tb[IFA_LABEL]))) zlog_info (" IFA_LABEL %s", RTA_DATA (tb[IFA_LABEL])); } - - /* peer or broadcast network? */ - if (ifa->ifa_family == AF_INET) - peeronly = if_is_pointopoint (ifp) || - ifa->ifa_prefixlen >= IPV4_MAX_PREFIXLEN - 1; -#ifdef HAVE_IPV6 - if (ifa->ifa_family == AF_INET6) + + if (tb[IFA_ADDRESS] == NULL) + tb[IFA_ADDRESS] = tb[IFA_LOCAL]; + + if (ifp->flags & IFF_POINTOPOINT) { - peeronly = if_is_pointopoint (ifp) || - ifa->ifa_prefixlen >= IPV6_MAX_PREFIXLEN - 1; + if (tb[IFA_LOCAL]) + { + addr = RTA_DATA (tb[IFA_LOCAL]); + if (tb[IFA_ADDRESS]) + broad = RTA_DATA (tb[IFA_ADDRESS]); + else + broad = NULL; + } + else + { + if (tb[IFA_ADDRESS]) + addr = RTA_DATA (tb[IFA_ADDRESS]); + else + addr = NULL; + } } -#endif /* HAVE_IPV6 */ - if (!(tb[IFA_LOCAL] && tb[IFA_ADDRESS])) + else { - /* FIXME: IPv6 Appears to have only IFA_ADDRESS */ - peeronly = 0; + if (tb[IFA_ADDRESS]) + addr = RTA_DATA (tb[IFA_ADDRESS]); + else + addr = NULL; + + if (tb[IFA_BROADCAST]) + broad = RTA_DATA(tb[IFA_BROADCAST]); + else + broad = NULL; } - /* network. prefixlen applies to IFA_ADDRESS rather than IFA_LOCAL */ - if (tb[IFA_ADDRESS] && !peeronly) - addr = RTA_DATA (tb[IFA_ADDRESS]); - else if (tb[IFA_LOCAL]) - addr = RTA_DATA (tb[IFA_LOCAL]); - else - addr = NULL; - - /* broadcast/peer */ - if (tb[IFA_BROADCAST]) - broad = RTA_DATA (tb[IFA_BROADCAST]); - else if (tb[IFA_ADDRESS] && peeronly) - broad = RTA_DATA (tb[IFA_ADDRESS]); /* peer address specified */ - else - broad = NULL; - /* Flags. */ if (ifa->ifa_flags & IFA_F_SECONDARY) SET_FLAG (flags, ZEBRA_IFA_SECONDARY); |