diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-01-04 21:48:13 +0100 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-01-17 14:03:26 +0100 | 
| commit | 2a27f13b2197d07d11454b6cc8d0e5fc5b6ded87 (patch) | |
| tree | 0e3e3f4f21943f7b960b11e474216dc3a3c36b77 /pimd/pim_addr.c | |
| parent | 98a81d2bffce9e5a80d0df35dfd0afff766dce0b (diff) | |
pimd: move, rename and deploy pim_addr_is_any()
Replaces comparison against INADDR_ANY, so we can do IPv6 too.
(Renamed from "pim_is_addr_any" for "pim_addr_*" naming pattern, and
type fixed to bool.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_addr.c')
| -rw-r--r-- | pimd/pim_addr.c | 8 | 
1 files changed, 2 insertions, 6 deletions
diff --git a/pimd/pim_addr.c b/pimd/pim_addr.c index 8d89b57141..2a6b4fe20f 100644 --- a/pimd/pim_addr.c +++ b/pimd/pim_addr.c @@ -39,12 +39,8 @@ static ssize_t printfrr_pimaddr(struct fbuf *buf, struct printfrr_eargs *ea,  	if (!addr)  		return bputs(buf, "(null)"); -	if (use_star) { -		pim_addr zero = {}; - -		if (memcmp(addr, &zero, sizeof(zero)) == 0) -			return bputch(buf, '*'); -	} +	if (use_star && pim_addr_is_any(*addr)) +		return bputch(buf, '*');  #if PIM_IPV == 4  	return bprintfrr(buf, "%pI4", addr);  | 
