diff options
Diffstat (limited to 'ospfd/ospf_neighbor.c')
| -rw-r--r-- | ospfd/ospf_neighbor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_neighbor.c b/ospfd/ospf_neighbor.c index a58bd93b6e..a9247dd0ec 100644 --- a/ospfd/ospf_neighbor.c +++ b/ospfd/ospf_neighbor.c @@ -402,12 +402,14 @@ void ospf_renegotiate_optional_capabilities(struct ospf *top) struct ospf_neighbor *ospf_nbr_lookup(struct ospf_interface *oi, struct ip *iph, struct ospf_header *ospfh) { + struct in_addr srcaddr = iph->ip_src; + if (oi->type == OSPF_IFTYPE_VIRTUALLINK || oi->type == OSPF_IFTYPE_POINTOPOINT) return (ospf_nbr_lookup_by_routerid(oi->nbrs, &ospfh->router_id)); else - return (ospf_nbr_lookup_by_addr(oi->nbrs, &iph->ip_src)); + return (ospf_nbr_lookup_by_addr(oi->nbrs, &srcaddr)); } static struct ospf_neighbor *ospf_nbr_add(struct ospf_interface *oi, |
