]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: show if area is NSSA 10425/head
authorckishimo <carles.kishimoto@gmail.com>
Tue, 25 Jan 2022 17:49:27 +0000 (18:49 +0100)
committerckishimo <carles.kishimoto@gmail.com>
Tue, 25 Jan 2022 17:49:29 +0000 (18:49 +0100)
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 <carles.kishimoto@gmail.com>
ospf6d/ospf6_area.c

index 75587b4d3a56cbfb2881268c8f567402584265ce..a612f7d1b87766ee5fabf6a22f8ed029a2b4d608 100644 (file)
@@ -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",