diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 17:24:41 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 17:24:41 -0700 |
| commit | 8b6912c2ffec50ef001cea062448ea3058d512e8 (patch) | |
| tree | 9063d834289c97154a3ef025a6bee6202fd2ec0e /ospfd/ospf_nsm.c | |
| parent | 9343ce8356304024ef946e7c1049de378eededb2 (diff) | |
Send ARP requests proactively during OSPF Adjacency formation.
Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com>
Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com>
Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_nsm.c')
| -rw-r--r-- | ospfd/ospf_nsm.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 0e6814e22b..d3266e8355 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -170,6 +170,10 @@ nsm_packet_received (struct ospf_neighbor *nbr) if (nbr->oi->type == OSPF_IFTYPE_NBMA && nbr->nbr_nbma) OSPF_POLL_TIMER_OFF (nbr->nbr_nbma->t_poll); + /* Send proactive ARP requests */ + if (nbr->state < NSM_Exchange) + ospf_proactively_arp (nbr); + return 0; } @@ -184,13 +188,22 @@ nsm_start (struct ospf_neighbor *nbr) OSPF_NSM_TIMER_ON (nbr->t_inactivity, ospf_inactivity_timer, nbr->v_inactivity); + /* Send proactive ARP requests */ + ospf_proactively_arp (nbr); + return 0; } static int nsm_twoway_received (struct ospf_neighbor *nbr) { - return (nsm_should_adj (nbr) ? NSM_ExStart : NSM_TwoWay); + int adj = nsm_should_adj (nbr); + + /* Send proactive ARP requests */ + if (adj) + ospf_proactively_arp (nbr); + + return (adj ? NSM_ExStart : NSM_TwoWay); } int @@ -273,6 +286,9 @@ nsm_negotiation_done (struct ospf_neighbor *nbr) struct ospf_lsa *lsa; struct route_node *rn; + /* Send proactive ARP requests */ + ospf_proactively_arp (nbr); + LSDB_LOOP (ROUTER_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); LSDB_LOOP (NETWORK_LSDB (area), rn, lsa) @@ -334,7 +350,12 @@ nsm_adj_ok (struct ospf_neighbor *nbr) int adj = nsm_should_adj (nbr); if (nbr->state == NSM_TwoWay && adj == 1) - next_state = NSM_ExStart; + { + next_state = NSM_ExStart; + + /* Send proactive ARP requests */ + ospf_proactively_arp (nbr); + } else if (nbr->state >= NSM_ExStart && adj == 0) next_state = NSM_TwoWay; |
