]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: fix warning message when interfae disabled
authorckishimo <carles.kishimoto@gmail.com>
Tue, 16 Mar 2021 23:14:26 +0000 (00:14 +0100)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 24 Mar 2021 15:55:56 +0000 (18:55 +0300)
When removing an interface from an existing area,
the warning message we get is not correct

  interface r1-r2-eth0
   ipv6 address 2013:12::1/64
   ipv6 ospf6 dead-interval 4
   ipv6 ospf6 hello-interval 1
  !
  interface dummy
   ipv6 ospf6 dead-interval 4
   ipv6 ospf6 hello-interval 1
   ipv6 ospf6 network point-to-point
  !
  router ospf6
   ospf6 router-id 1.1.1.1
   interface r1-r2-eth0 area 0.0.0.0
  !

  r1(config-if)# router ospf6
  r1(config-ospf6)# no interface dummy area 0.0.0.0
  No such Area-ID: 0.0.0.0   <--- area 0.0.0.0 exists

This is fixing the error message

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
ospf6d/ospf6_top.c

index ef496b589daf36ab93df88b789419415fb90604e..960cd3ee01b471080c4d6fb7ff0fed020554bdfd 100644 (file)
@@ -735,7 +735,8 @@ DEFUN (no_ospf6_interface_area,
 
        /* Verify Area */
        if (oi->area == NULL) {
-               vty_out(vty, "No such Area-ID: %s\n", argv[idx_ipv4]->arg);
+               vty_out(vty, "%s not attached to area %s\n",
+                       oi->interface->name, oi->area->name);
                return CMD_SUCCESS;
        }