summaryrefslogtreecommitdiffstats
path: root/pimd/pim_zebra.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-01-14 16:55:12 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-02-14 06:45:03 +0100
commitc631920c151f0130986cb9051daa710bb0eb261b (patch)
treebc3351777ea0323aa17ebd2878516a31a29e75ad /pimd/pim_zebra.c
parentpim6d: prepare SSM/filter functions (diff)
downloadfrr-c631920c151f0130986cb9051daa710bb0eb261b.tar.xz
frr-c631920c151f0130986cb9051daa710bb0eb261b.zip
pim6d: IPv6-adjust various pim_sgaddr uses
Since `pim_sgaddr` is `pim_addr` now, that causes a whole lot of fallout anywhere S,G pairs are handled. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_zebra.c')
-rw-r--r--pimd/pim_zebra.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 2efafd4b9..5f9273eb4 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -337,8 +337,8 @@ static int pim_zebra_vxlan_sg_proc(ZAPI_CALLBACK_ARGS)
s = zclient->ibuf;
prefixlen = stream_getl(s);
- stream_get(&sg.src.s_addr, s, prefixlen);
- stream_get(&sg.grp.s_addr, s, prefixlen);
+ stream_get(&sg.src, s, prefixlen);
+ stream_get(&sg.grp, s, prefixlen);
if (PIM_DEBUG_ZEBRA)
zlog_debug("%u:recv SG %s %pSG", vrf_id,
@@ -606,7 +606,7 @@ void igmp_source_forward_start(struct pim_instance *pim,
}
if (!source->source_channel_oil) {
- struct in_addr vif_source;
+ pim_addr vif_source;
struct prefix src, grp;
struct pim_nexthop nexthop;
struct pim_upstream *up = NULL;
@@ -619,12 +619,8 @@ void igmp_source_forward_start(struct pim_instance *pim,
}
else {
- src.family = AF_INET;
- src.prefixlen = IPV4_MAX_BITLEN;
- src.u.prefix4 = vif_source; // RP or Src address
- grp.family = AF_INET;
- grp.prefixlen = IPV4_MAX_BITLEN;
- grp.u.prefix4 = sg.grp;
+ pim_addr_to_prefix(&src, vif_source); // RP or Src addr
+ pim_addr_to_prefix(&grp, sg.grp);
up = pim_upstream_find(pim, &sg);
if (up) {
@@ -642,15 +638,11 @@ void igmp_source_forward_start(struct pim_instance *pim,
pim_ecmp_fib_lookup_if_vif_index(
pim, &src, &grp);
- if (PIM_DEBUG_ZEBRA) {
- char buf2[INET_ADDRSTRLEN];
-
- pim_inet4_dump("<source?>", vif_source, buf2,
- sizeof(buf2));
- zlog_debug("%s: NHT %pSG vif_source %s vif_index:%d ",
- __func__, &sg, buf2,
- input_iface_vif_index);
- }
+ if (PIM_DEBUG_ZEBRA)
+ zlog_debug(
+ "%s: NHT %pSG vif_source %pPAs vif_index:%d ",
+ __func__, &sg, &vif_source,
+ input_iface_vif_index);
if (input_iface_vif_index < 1) {
if (PIM_DEBUG_IGMP_TRACE) {