summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2015-11-10 18:21:44 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-03-30 02:26:21 +0200
commit17baea9c4eadff77660a4f0aaead0d088cc95b12 (patch)
tree82d65d587878aa0318c5c0511f032bf91025ce24 /isisd
parentisisd: allow to adjust lsp-mtu (diff)
downloadfrr-17baea9c4eadff77660a4f0aaead0d088cc95b12.tar.xz
frr-17baea9c4eadff77660a4f0aaead0d088cc95b12.zip
isisd: purge on correct level
Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_lsp.c6
-rw-r--r--isisd/isis_lsp.h3
-rw-r--r--isisd/isis_pdu.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index ed4ce2563..5de08325a 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -2345,7 +2345,8 @@ lsp_purge_pseudo (u_char * id, struct isis_circuit *circuit, int level)
* -> Do as in 7.3.16.4
*/
void
-lsp_purge_non_exist (struct isis_link_state_hdr *lsp_hdr,
+lsp_purge_non_exist (int level,
+ struct isis_link_state_hdr *lsp_hdr,
struct isis_area *area)
{
struct isis_lsp *lsp;
@@ -2355,8 +2356,7 @@ lsp_purge_non_exist (struct isis_link_state_hdr *lsp_hdr,
*/
lsp = XCALLOC (MTYPE_ISIS_LSP, sizeof (struct isis_lsp));
lsp->area = area;
- lsp->level = ((lsp_hdr->lsp_bits & LSPBIT_IST) == IS_LEVEL_1) ?
- IS_LEVEL_1 : IS_LEVEL_2;
+ lsp->level = level;
lsp->pdu = stream_new(LLC_LEN + area->lsp_mtu);
lsp->isis_header = (struct isis_fixed_hdr *) STREAM_DATA (lsp->pdu);
fill_fixed_hdr (lsp->isis_header, (lsp->level == IS_LEVEL_1) ? L1_LINK_STATE
diff --git a/isisd/isis_lsp.h b/isisd/isis_lsp.h
index 92a5dfe59..a35bfa762 100644
--- a/isisd/isis_lsp.h
+++ b/isisd/isis_lsp.h
@@ -87,7 +87,8 @@ void lsp_build_list_ssn (struct isis_circuit *circuit, u_char num_lsps,
void lsp_search_and_destroy (u_char * id, dict_t * lspdb);
void lsp_purge_pseudo (u_char * id, struct isis_circuit *circuit, int level);
-void lsp_purge_non_exist (struct isis_link_state_hdr *lsp_hdr,
+void lsp_purge_non_exist (int level,
+ struct isis_link_state_hdr *lsp_hdr,
struct isis_area *area);
#define LSP_EQUAL 1
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index 361a90be8..02d6fffc7 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -1529,7 +1529,7 @@ dontcheckadj:
if (!lsp)
{
/* 7.3.16.4: initiate a purge */
- lsp_purge_non_exist (hdr, circuit->area);
+ lsp_purge_non_exist(level, hdr, circuit->area);
return ISIS_OK;
}
/* 7.3.15.1 d) - If this is our own lsp and we have it */