From: Amritha Nambiar Date: Thu, 23 Apr 2015 22:36:55 +0000 (-0700) Subject: isisd: fix crash on processing own p2p hello X-Git-Tag: frr-2.0-rc1~737 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0908a2fdd38417908959f548548ca13a3b5c435a;p=mirror%2Ffrr.git isisd: fix crash on processing own p2p hello isis_pdu.c : isisd crashes if router's own p2p hello packets get processed thereby creating an adjacecncy with itself. Asserts at isis_find_vertex. So discard own p2p IIH PDU and avoid creating adjacency with self. This would also fix duplicate systemID on an interface. These checks already exists for IS-IS LAN Level 1/2 Hello PDU in process_lan_hello, but not for point-to-point IIH PDUs. Signed-off-by: Amritha Nambiar Signed-off-by: David Lamparter (cherry picked from commit 491417ac6383e2ea557951b24eb7bd3fffb69394) --- diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index a4fe65af45..d0b67501ba 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -561,6 +561,17 @@ process_p2p_hello (struct isis_circuit *circuit) return ISIS_WARNING; } + /* + * it's own p2p IIH PDU - discard + */ + if (!memcmp (hdr->source_id, isis->sysid, ISIS_SYS_ID_LEN)) + { + zlog_warn ("ISIS-Adj (%s): it's own IIH PDU - discarded", + circuit->area->area_tag); + free_tlvs (&tlvs); + return ISIS_WARNING; + } + /* * My interpertation of the ISO, if no adj exists we will create one for * the circuit