]> git.proxmox.com Git - mirror_frr.git/commit - ospf6d/ospf6_area.c
ospf6d: give error information for commands with non-exist vrfs
authoranlan_cs <anlan_cs@tom.com>
Tue, 11 Jan 2022 09:21:05 +0000 (04:21 -0500)
committeranlan_cs <anlan_cs@tom.com>
Tue, 11 Jan 2022 09:21:05 +0000 (04:21 -0500)
commitd6b901ac78f164a5239c7694076968456bd163d4
tree0fbaa60bae41c0c4bc9529784bf5ee12b1dfd7fd
parentc274b697ee856a67cd225d5ae05195063a991047
ospf6d: give error information for commands with non-exist vrfs

Currently the ospf6d's commands with non-exist vrfs can't give the error
informations to users.

This commit adds a macro "OSPF6_CMD_CHECK_VRF" to give error information
if with non-exist vrfs. As usual, skip the checking process in the case
of json.

So one command can call this macro to do the checking process in its
end. At that time it need know json style or not, so add "json" parameter for
several related functions.

BTW, suppress the build warning of the macro `OSPF6_FIND_VRF_ARGS`:
"Macros starting with if should be enclosed by a do - while loop to avoid
possible if/else logic defects."

Signed-off-by: anlan_cs <anlan_cs@tom.com>
ospf6d/ospf6_area.c
ospf6d/ospf6_asbr.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_top.c
ospf6d/ospf6d.c
ospf6d/ospf6d.h