mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 03:28:31 +00:00
Merge pull request #12115 from donaldsharp/ospf_unnumbered_showdown
ospfd: Allow unnumbered and numbered addresses to co-exist better
This commit is contained in:
commit
fd30c2467a
@ -461,13 +461,13 @@ struct ospf_interface *ospf_if_lookup_recv_if(struct ospf *ospf,
|
|||||||
{
|
{
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
struct prefix_ipv4 addr;
|
struct prefix_ipv4 addr;
|
||||||
struct ospf_interface *oi, *match;
|
struct ospf_interface *oi, *match, *unnumbered_match;
|
||||||
|
|
||||||
addr.family = AF_INET;
|
addr.family = AF_INET;
|
||||||
addr.prefix = src;
|
addr.prefix = src;
|
||||||
addr.prefixlen = IPV4_MAX_BITLEN;
|
addr.prefixlen = IPV4_MAX_BITLEN;
|
||||||
|
|
||||||
match = NULL;
|
match = unnumbered_match = NULL;
|
||||||
|
|
||||||
for (rn = route_top(IF_OIFS(ifp)); rn; rn = route_next(rn)) {
|
for (rn = route_top(IF_OIFS(ifp)); rn; rn = route_next(rn)) {
|
||||||
oi = rn->info;
|
oi = rn->info;
|
||||||
@ -482,7 +482,7 @@ struct ospf_interface *ospf_if_lookup_recv_if(struct ospf *ospf,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED))
|
if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED))
|
||||||
match = oi;
|
unnumbered_match = oi;
|
||||||
else if (prefix_match(CONNECTED_PREFIX(oi->connected),
|
else if (prefix_match(CONNECTED_PREFIX(oi->connected),
|
||||||
(struct prefix *)&addr)) {
|
(struct prefix *)&addr)) {
|
||||||
if ((match == NULL) || (match->address->prefixlen
|
if ((match == NULL) || (match->address->prefixlen
|
||||||
@ -491,7 +491,10 @@ struct ospf_interface *ospf_if_lookup_recv_if(struct ospf *ospf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (match)
|
||||||
return match;
|
return match;
|
||||||
|
|
||||||
|
return unnumbered_match;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ospf_interface_fifo_flush(struct ospf_interface *oi)
|
void ospf_interface_fifo_flush(struct ospf_interface *oi)
|
||||||
|
Loading…
Reference in New Issue
Block a user