diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-12-09 13:26:38 -0500 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-12-09 16:05:01 -0500 | 
| commit | 534b98f9254dad9845492ba42fa93a0ea32aa5fb (patch) | |
| tree | 1f6065e80fec84c8d017f8743547dc5a4fc01e5c /vrrpd/vrrp_northbound.c | |
| parent | 0dad8e91b78c5840f52cf9cef438bc5299d43798 (diff) | |
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_northbound.c')
| -rw-r--r-- | vrrpd/vrrp_northbound.c | 15 | 
1 files changed, 5 insertions, 10 deletions
diff --git a/vrrpd/vrrp_northbound.c b/vrrpd/vrrp_northbound.c index cf9ae2e65b..feaea6c038 100644 --- a/vrrpd/vrrp_northbound.c +++ b/vrrpd/vrrp_northbound.c @@ -118,9 +118,7 @@ lib_interface_vrrp_vrrp_group_lookup_entry(const void *parent_list_entry,  	uint32_t vrid = strtoul(keys->key[0], NULL, 10);  	const struct interface *ifp = parent_list_entry; -	vrrp_lookup(ifp, vrid); - -	return NULL; +	return vrrp_lookup(ifp, vrid);  }  /* @@ -148,6 +146,9 @@ lib_interface_vrrp_vrrp_group_version_modify(enum nb_event event,  	return NB_OK;  } +/* + * Helper function for address list OP_MODIFY callbacks. + */  static void vrrp_yang_add_del_virtual_address(const struct lyd_node *dnode,  					      bool add)  { @@ -164,9 +165,6 @@ static void vrrp_yang_add_del_virtual_address(const struct lyd_node *dnode,  	vrrp_check_start(vr);  } - -//----------- -  /*   * XPath:   * /frr-interface:lib/interface/frr-vrrpd:vrrp/vrrp-group/v4/virtual-address @@ -401,11 +399,8 @@ lib_interface_vrrp_vrrp_group_v6_source_address_get_elem(const char *xpath,  {  	const struct vrrp_vrouter *vr = list_entry;  	struct yang_data *val = NULL; -	struct ipaddr ip; - -	memset(&ip, 0x00, sizeof(ip)); -	if (memcmp(&vr->v6->src.ipaddr_v6, &ip.ipaddr_v6, sizeof(ip.ipaddr_v6))) +	if (ipaddr_isset(&vr->v6->src))  		val = yang_data_new_ip(xpath, &vr->v6->src);  	return val;  | 
