diff options
Diffstat (limited to 'proto')
-rw-r--r-- | proto/bfd/bfd.c | 2 | ||||
-rw-r--r-- | proto/ospf/config.Y | 4 | ||||
-rw-r--r-- | proto/ospf/iface.c | 3 | ||||
-rw-r--r-- | proto/ospf/neighbor.c | 5 | ||||
-rw-r--r-- | proto/ospf/packet.c | 4 | ||||
-rw-r--r-- | proto/radv/config.Y | 2 |
6 files changed, 11 insertions, 9 deletions
diff --git a/proto/bfd/bfd.c b/proto/bfd/bfd.c index 7a085791..3ba3a5d9 100644 --- a/proto/bfd/bfd.c +++ b/proto/bfd/bfd.c @@ -112,7 +112,7 @@ #define HASH_IP_KEY(n) n->addr #define HASH_IP_NEXT(n) n->next_ip #define HASH_IP_EQ(a,b) ipa_equal(a,b) -#define HASH_IP_FN(k) ipa_hash32(k) +#define HASH_IP_FN(k) ipa_hash(k) static list bfd_proto_list; static list bfd_wait_list; diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index 5673ef60..881ec781 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -220,7 +220,7 @@ ospf_stubnet_start: net_ip { this_stubnet = cfg_allocz(sizeof(struct ospf_stubnet_config)); add_tail(&this_area->stubnet_list, NODE this_stubnet); - this_stubnet->prefix = $1.n; + this_stubnet->prefix = $1; this_stubnet->cost = COST_D; } ; @@ -330,7 +330,7 @@ pref_base: net_ip { this_pref = cfg_allocz(sizeof(struct area_net_config)); add_tail(this_nets, NODE this_pref); - this_pref->prefix = $1.n; + this_pref->prefix = $1; } ; diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 442cec3a..8c997ced 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -581,6 +581,7 @@ ospf_iface_new(struct ospf_area *oa, struct ifa *addr, struct ospf_iface_patt *i if (ip->ptp_netmask < 2) ifa->ptp_netmask = ip->ptp_netmask; + ifa->drip = ifa->bdrip = ospf_is_v2(p) ? IPA_NONE4 : IPA_NONE6; ifa->type = ospf_iface_classify(ip->type, addr); @@ -1333,7 +1334,7 @@ ospf_iface_info(struct ospf_iface *ifa) else if (ifa->addr->flags & IA_PEER) cli_msg(-1015, "Interface %s (peer %I)", ifa->ifname, ifa->addr->opposite); else - cli_msg(-1015, "Interface %s (%N)", ifa->ifname, ifa->addr->prefix); + cli_msg(-1015, "Interface %s (%N)", ifa->ifname, &ifa->addr->prefix); cli_msg(-1015, "\tType: %s%s", ospf_it[ifa->type], more); cli_msg(-1015, "\tArea: %R (%u)", ifa->oa->areaid, ifa->oa->areaid); diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index c5d44dec..b30b0438 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -506,13 +506,14 @@ ospf_dr_election(struct ospf_iface *ifa) u32 old_drid = ifa->drid; u32 old_bdrid = ifa->bdrid; + ip_addr none = ospf_is_v2(p) ? IPA_NONE4 : IPA_NONE6; ifa->drid = ndr ? ndr->rid : 0; - ifa->drip = ndr ? ndr->ip : IPA_NONE; + ifa->drip = ndr ? ndr->ip : none; ifa->dr_iface_id = ndr ? ndr->iface_id : 0; ifa->bdrid = nbdr ? nbdr->rid : 0; - ifa->bdrip = nbdr ? nbdr->ip : IPA_NONE; + ifa->bdrip = nbdr ? nbdr->ip : none; DBG("DR=%R, BDR=%R\n", ifa->drid, ifa->bdrid); diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index 9690c28a..35ef7c6e 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -500,8 +500,8 @@ ospf_send_to_agt(struct ospf_iface *ifa, u8 state) void ospf_send_to_bdr(struct ospf_iface *ifa) { - if (ipa_nonzero(ifa->drip)) + if (ipa_nonzero2(ifa->drip)) ospf_send_to(ifa, ifa->drip); - if (ipa_nonzero(ifa->bdrip)) + if (ipa_nonzero2(ifa->bdrip)) ospf_send_to(ifa, ifa->bdrip); } diff --git a/proto/radv/config.Y b/proto/radv/config.Y index efb474a6..5e655de4 100644 --- a/proto/radv/config.Y +++ b/proto/radv/config.Y @@ -150,7 +150,7 @@ radv_iface: radv_prefix_start: net_ip6 { this_radv_prefix = cfg_allocz(sizeof(struct radv_prefix_config)); - RADV_PREFIX->prefix = $1.ip6; + RADV_PREFIX->prefix = *(net_addr_ip6 *) &($1); RADV_PREFIX->onlink = 1; RADV_PREFIX->autonomous = 1; |