diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2022-01-05 15:56:18 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2022-01-17 14:08:58 +0100 |
commit | 62f59b58ba4c0fa2a5763bccaade47d6b070438b (patch) | |
tree | 7174d035faddc37f9c8b78b25cd9e6b05892a822 /pimd/pim_ifchannel.c | |
parent | pimd: remove pim_addr_copy (diff) | |
download | frr-62f59b58ba4c0fa2a5763bccaade47d6b070438b.tar.xz frr-62f59b58ba4c0fa2a5763bccaade47d6b070438b.zip |
pimd: deploy pim_sgaddr_* helpers
Use _cmp/_hash/_match helpers for operations on pim_sgaddr to prepare
IPv6 support.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_ifchannel.c')
-rw-r--r-- | pimd/pim_ifchannel.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 7a98e693e..5b650e6e3 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -62,19 +62,7 @@ int pim_ifchannel_compare(const struct pim_ifchannel *ch1, if (pim_ifp1->mroute_vif_index > pim_ifp2->mroute_vif_index) return 1; - if (ntohl(ch1->sg.grp.s_addr) < ntohl(ch2->sg.grp.s_addr)) - return -1; - - if (ntohl(ch1->sg.grp.s_addr) > ntohl(ch2->sg.grp.s_addr)) - return 1; - - if (ntohl(ch1->sg.src.s_addr) < ntohl(ch2->sg.src.s_addr)) - return -1; - - if (ntohl(ch1->sg.src.s_addr) > ntohl(ch2->sg.src.s_addr)) - return 1; - - return 0; + return pim_sgaddr_cmp(ch1->sg, ch2->sg); } /* |