summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-12-09 19:26:38 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-12-09 22:05:01 +0100
commit534b98f9254dad9845492ba42fa93a0ea32aa5fb (patch)
tree1f6065e80fec84c8d017f8743547dc5a4fc01e5c /vrrpd/vrrp.c
parentlib: add ipaddr_isset() (diff)
downloadfrr-534b98f9254dad9845492ba42fa93a0ea32aa5fb.tar.xz
frr-534b98f9254dad9845492ba42fa93a0ea32aa5fb.zip
vrrpd, yang: cleanup vrrp nb conversion
- Use correct units and conversions in model & code - Fix incorrect CLI help string for V6 virtual addrs - Fix nb get-entry callback for virtual router - Fix a couple style nits - Simplify some CLI code - Remove unused code - Remove unused YANG definitions - Update sighup() to handle reloads - Update interface level config writer to use NB callbacks - Add simplified `no` forms for priority and advertisement-interval commands Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vrrpd/vrrp.c')
-rw-r--r--vrrpd/vrrp.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 77bdf79b9..46cd12d71 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -458,8 +458,6 @@ int vrrp_add_ipv6(struct vrrp_vrouter *vr, struct in6_addr v6)
return vrrp_add_ip(vr, &ip);
}
-
-
int vrrp_del_ip(struct vrrp_vrouter *vr, struct ipaddr *ip)
{
struct listnode *ln, *nn;
@@ -2264,71 +2262,6 @@ void vrrp_if_address_del(struct interface *ifp)
/* Other ------------------------------------------------------------------- */
-int vrrp_config_write_interface(struct vty *vty)
-{
- struct list *vrs = hash_to_list(vrrp_vrouters_hash);
- struct listnode *ln, *ipln;
- struct vrrp_vrouter *vr;
- int writes = 0;
-
- for (ALL_LIST_ELEMENTS_RO(vrs, ln, vr)) {
- vty_frame(vty, "interface %s\n", vr->ifp->name);
- ++writes;
-
- vty_out(vty, " vrrp %" PRIu8 "%s\n", vr->vrid,
- vr->version == 2 ? " version 2" : "");
- ++writes;
-
- if (vr->shutdown != vd.shutdown && ++writes)
- vty_out(vty, " %svrrp %" PRIu8 " shutdown\n",
- vr->shutdown ? "" : "no ", vr->vrid);
-
- if (vr->preempt_mode != vd.preempt_mode && ++writes)
- vty_out(vty, " %svrrp %" PRIu8 " preempt\n",
- vr->preempt_mode ? "" : "no ", vr->vrid);
-
- if (vr->accept_mode != vd.accept_mode && ++writes)
- vty_out(vty, " %svrrp %" PRIu8 " accept\n",
- vr->accept_mode ? "" : "no ", vr->vrid);
-
- if (vr->advertisement_interval != vd.advertisement_interval
- && ++writes)
- vty_out(vty,
- " vrrp %" PRIu8
- " advertisement-interval %d\n",
- vr->vrid, vr->advertisement_interval * CS2MS);
-
- if (vr->priority != vd.priority && ++writes)
- vty_out(vty, " vrrp %" PRIu8 " priority %" PRIu8 "\n",
- vr->vrid, vr->priority);
-
- struct ipaddr *ip;
-
- for (ALL_LIST_ELEMENTS_RO(vr->v4->addrs, ipln, ip)) {
- char ipbuf[INET6_ADDRSTRLEN];
-
- ipaddr2str(ip, ipbuf, sizeof(ipbuf));
- vty_out(vty, " vrrp %" PRIu8 " ip %s\n", vr->vrid,
- ipbuf);
- ++writes;
- }
-
- for (ALL_LIST_ELEMENTS_RO(vr->v6->addrs, ipln, ip)) {
- char ipbuf[INET6_ADDRSTRLEN];
-
- ipaddr2str(ip, ipbuf, sizeof(ipbuf));
- vty_out(vty, " vrrp %" PRIu8 " ipv6 %s\n", vr->vrid,
- ipbuf);
- ++writes;
- }
- vty_endframe(vty, "!\n");
- }
-
- list_delete(&vrs);
-
- return writes;
-}
-
int vrrp_config_write_global(struct vty *vty)
{
unsigned int writes = 0;