summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorAmritha Nambiar <amritha.nambiar@intel.com>2015-01-28 19:09:30 +0100
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-05-26 17:24:51 +0200
commit793ec4733d47fcc2a2f60e55961b0511bdb61273 (patch)
treefb1e96f46bc033d0aa093c14086c3429a8ba7b10 /isisd
parentisisd: fix crash on changing the circuit type of a passive interface (diff)
downloadfrr-793ec4733d47fcc2a2f60e55961b0511bdb61273.tar.xz
frr-793ec4733d47fcc2a2f60e55961b0511bdb61273.zip
isisd: match adjacency with source of hellos
isis_pdu.c: match adjacency with source of hellos, check for source ID on receiving hello If an adjacency exists, check the adjacency is with the same router as the source of the hellos. In case a mismatch is detected, bring down the adjacency and let the next hellos trigger creating the new adjacency. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 3c28aaf437d8d473adb89c5e74574a61a9ea7cc6)
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_pdu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index dad39bcda..a4fe65af4 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -566,6 +566,17 @@ process_p2p_hello (struct isis_circuit *circuit)
* the circuit
*/
adj = circuit->u.p2p.neighbor;
+ /* If an adjacency exists, check it is with the source of the hello
+ * packets */
+ if (adj)
+ {
+ if (memcmp(hdr->source_id, adj->sysid, ISIS_SYS_ID_LEN))
+ {
+ zlog_debug("hello source and adjacency do not match, set adj down\n");
+ isis_adj_state_change (adj, ISIS_ADJ_DOWN, "adj do not exist");
+ return 0;
+ }
+ }
if (!adj || adj->level != hdr->circuit_t)
{
if (!adj)