diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-05-17 22:08:01 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 15:52:16 +0200 |
commit | 23b11ab185878eb77b3212b9673856bc99d960f2 (patch) | |
tree | 11bea3ade4bb5caad1fed8e83657ded63528f730 /ospf6d | |
parent | Merge pull request #11008 from patrasar/sec_addr_list_pimv6 (diff) | |
download | frr-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.c | 12 |
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; } |