summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-05-17 22:08:01 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-05-20 15:52:16 +0200
commit23b11ab185878eb77b3212b9673856bc99d960f2 (patch)
tree11bea3ade4bb5caad1fed8e83657ded63528f730 /ospf6d
parentMerge pull request #11008 from patrasar/sec_addr_list_pimv6 (diff)
downloadfrr-23b11ab185878eb77b3212b9673856bc99d960f2.tar.xz
frr-23b11ab185878eb77b3212b9673856bc99d960f2.zip
ospf6d: Remove double check of default prefix
The ospf6_is_valid_summary_addr function is checking to see if a prefix is the default and also then double comparing it against the v6 prefix part. No need to do this. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_top.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 8f482d707..f85bdb35b 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -1756,14 +1756,10 @@ DEFUN(show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd,
bool ospf6_is_valid_summary_addr(struct vty *vty, struct prefix *p)
{
- struct in6_addr addr_zero;
-
- memset(&addr_zero, 0, sizeof(addr_zero));
-
- /* Default prefix validation*/
- if ((is_default_prefix(p)) ||
- (!memcmp(&p->u.prefix6, &addr_zero, sizeof(struct in6_addr)))) {
- vty_out(vty, "Default address should not be configured as summary address.\n");
+ /* Default prefix validation*/
+ if (is_default_prefix(p)) {
+ vty_out(vty,
+ "Default address should not be configured as summary address.\n");
return false;
}