From fb5a450fe7ca484b548de65f61c0b539b902ec3f Mon Sep 17 00:00:00 2001 From: ckishimo Date: Tue, 25 Jan 2022 18:47:47 +0100 Subject: [PATCH 1/2] ospf6d: fix indentation in show ipv6 ospf area Signed-off-by: ckishimo --- ospf6d/ospf6_area.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 417fc69694..75587b4d3a 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -511,11 +511,13 @@ void ospf6_area_show(struct vty *vty, struct ospf6_area *oa, if (oa->ts_spf.tv_sec || oa->ts_spf.tv_usec) { result = monotime_since(&oa->ts_spf, NULL); if (result / TIMER_SECOND_MICRO > 0) { - vty_out(vty, "SPF last executed %ld.%lds ago\n", + vty_out(vty, + " SPF last executed %ld.%lds ago\n", result / TIMER_SECOND_MICRO, result % TIMER_SECOND_MICRO); } else { - vty_out(vty, "SPF last executed %ldus ago\n", + vty_out(vty, + " SPF last executed %ldus ago\n", result); } } else From cfc5d4746d10d27fe36a083829485f3466ec40ee Mon Sep 17 00:00:00 2001 From: ckishimo Date: Tue, 25 Jan 2022 18:49:27 +0100 Subject: [PATCH 2/2] ospf6d: show if area is NSSA This PR will include if the area is NSSA in the output of "show ipv6 ospf" r2# show ipv6 ospf ... Area 0.0.0.0 Number of Area scoped LSAs is 8 Interface attached to this area: r2-eth1 SPF last executed 20.46717s ago Area 0.0.0.1[Stub] Number of Area scoped LSAs is 9 Interface attached to this area: r2-eth0 SPF last executed 20.46911s ago Area 0.0.0.2[NSSA] Number of Area scoped LSAs is 14 Interface attached to this area: r2-eth2 SPF last executed 20.46801s ago Signed-off-by: ckishimo --- ospf6d/ospf6_area.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 75587b4d3a..a612f7d1b8 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -446,7 +446,9 @@ void ospf6_area_show(struct vty *vty, struct ospf6_area *oa, json_area = json_object_new_object(); json_object_boolean_add(json_area, "areaIsStub", IS_AREA_STUB(oa)); - if (IS_AREA_STUB(oa)) { + json_object_boolean_add(json_area, "areaIsNSSA", + IS_AREA_NSSA(oa)); + if (IS_AREA_STUB(oa) || IS_AREA_NSSA(oa)) { json_object_boolean_add(json_area, "areaNoSummary", oa->no_summary); } @@ -490,14 +492,16 @@ void ospf6_area_show(struct vty *vty, struct ospf6_area *oa, } else { - if (!IS_AREA_STUB(oa)) + if (!IS_AREA_STUB(oa) && !IS_AREA_NSSA(oa)) vty_out(vty, " Area %s\n", oa->name); else { if (oa->no_summary) { - vty_out(vty, " Area %s[Stub, No Summary]\n", - oa->name); + vty_out(vty, " Area %s[%s, No Summary]\n", + oa->name, + IS_AREA_STUB(oa) ? "Stub" : "NSSA"); } else { - vty_out(vty, " Area %s[Stub]\n", oa->name); + vty_out(vty, " Area %s[%s]\n", oa->name, + IS_AREA_STUB(oa) ? "Stub" : "NSSA"); } } vty_out(vty, " Number of Area scoped LSAs is %u\n",