mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-27 00:06:46 +00:00
pimd: Create macro to get appropriate pim instance
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
c9657fdc91
commit
ae4a6b57ca
@ -4524,8 +4524,7 @@ DEFUN (ip_pim_rp,
|
||||
"ip address of RP\n"
|
||||
"Group Address range to cover\n")
|
||||
{
|
||||
VTY_DECLVAR_CONTEXT(vrf, vrf);
|
||||
struct pim_instance *pim = vrf->info;
|
||||
PIM_DECLVAR_CONTEXT(vrf, pim);
|
||||
int idx_ipv4 = 3;
|
||||
|
||||
if (argc == (idx_ipv4 + 1))
|
||||
|
||||
@ -66,4 +66,13 @@
|
||||
|
||||
void pim_cmd_init(void);
|
||||
|
||||
/*
|
||||
* Special Macro to allow us to get the correct pim_instance;
|
||||
*/
|
||||
#define PIM_DECLVAR_CONTEXT(A, B) \
|
||||
struct vrf *A = VTY_GET_CONTEXT(vrf); \
|
||||
struct pim_instance *B = \
|
||||
(vrf) ? vrf->info : pim_get_pim_instance(VRF_DEFAULT); \
|
||||
vrf = (vrf) ? vrf : pim->vrf;
|
||||
|
||||
#endif /* PIM_CMD_H */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user