mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
pimd: Modify in_addr to pim_addr in pim_assert_metric
This change is to accomodate IPv6 and IPv4 in the same code. Based on pimd or pim6d, this will be compiled. Reviewed-by: Sarita Patra <saritap@vmware.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
This commit is contained in:
parent
b85201d5cd
commit
95d516622b
@ -339,7 +339,7 @@ int pim_assert_metric_better(const struct pim_assert_metric *m1,
|
|||||||
if (m1->route_metric > m2->route_metric)
|
if (m1->route_metric > m2->route_metric)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return ntohl(m1->ip_address.s_addr) > ntohl(m2->ip_address.s_addr);
|
return pim_addr_cmp(m1->ip_address, m2->ip_address) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pim_assert_metric_match(const struct pim_assert_metric *m1,
|
int pim_assert_metric_match(const struct pim_assert_metric *m1,
|
||||||
@ -352,7 +352,7 @@ int pim_assert_metric_match(const struct pim_assert_metric *m1,
|
|||||||
if (m1->route_metric != m2->route_metric)
|
if (m1->route_metric != m2->route_metric)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return m1->ip_address.s_addr == m2->ip_address.s_addr;
|
return !pim_addr_cmp(m1->ip_address, m2->ip_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
int pim_assert_build_msg(uint8_t *pim_msg, int buf_size, struct interface *ifp,
|
int pim_assert_build_msg(uint8_t *pim_msg, int buf_size, struct interface *ifp,
|
||||||
|
@ -37,7 +37,7 @@ struct pim_assert_metric {
|
|||||||
uint32_t rpt_bit_flag;
|
uint32_t rpt_bit_flag;
|
||||||
uint32_t metric_preference;
|
uint32_t metric_preference;
|
||||||
uint32_t route_metric;
|
uint32_t route_metric;
|
||||||
struct in_addr ip_address; /* neighbor router that sourced the Assert
|
pim_addr ip_address; /* neighbor router that sourced the Assert
|
||||||
message */
|
message */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user