diff options
| author | Russ White <russ@riw.us> | 2025-01-07 08:56:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 08:56:36 -0500 |
| commit | 88f80328cadfe55c025bfbaf8a24cfbfebb18f14 (patch) | |
| tree | 4c12f437bf55a21a0cd7fa9b50ae6076ad6befc9 | |
| parent | 1b13705517fedd196c64a9069e7b63ca5cdfe330 (diff) | |
| parent | 533d387a7f7ebaa5b48a9d67d361d4331b00af57 (diff) | |
Merge pull request #17779 from anlancs/ospfd/fix-wrong-check-summary
ospfd: fix wrong check for two commands
| -rw-r--r-- | ospfd/ospf_vty.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 27528f6594..95e8b179d8 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -10258,8 +10258,10 @@ DEFUN (ospf_external_route_aggregation, tag = strtoul(argv[idx + 2]->arg, NULL, 10); ret = ospf_asbr_external_aggregator_set(ospf, &p, tag); - if (ret == OSPF_INVALID) - vty_out(vty, "Invalid configuration!!\n"); + if (ret == OSPF_FAILURE) { + vty_out(vty, "%% Failed to set summary-address!\n"); + return CMD_WARNING_CONFIG_FAILED; + } return CMD_SUCCESS; } @@ -10611,8 +10613,10 @@ DEFUN (ospf_external_route_aggregation_no_adrvertise, } ret = ospf_asbr_external_rt_no_advertise(ospf, &p); - if (ret == OSPF_INVALID) - vty_out(vty, "Invalid configuration!!\n"); + if (ret == OSPF_FAILURE) { + vty_out(vty, "%% Failed to set summary-address!\n"); + return CMD_WARNING_CONFIG_FAILED; + } return CMD_SUCCESS; } |
