Commit graph

16 commits

Author SHA1 Message Date
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Mark Stapp ee2bbf7ce2 pimd: replace inet_ntoa
Replace all use of inet_ntoa, using %pI4 or inet_ntoa instead

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-22 10:13:56 -04:00
Quentin Young 772270f3b6 *: sprintf -> snprintf
Replace sprintf with snprintf where straightforward to do so.

- sprintf's into local scope buffers of known size are replaced with the
  equivalent snprintf call
- snprintf's into local scope buffers of known size that use the buffer
  size expression now use sizeof(buffer)
- sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp
  buffer followed by strlcat

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-20 19:14:33 -04:00
Donatas Abraitis 975a328e2e *: Replace s_addr 0 => INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-06 09:00:12 +02:00
Donald Sharp 0ce5349f98 pimd: Cleanup mtracebis.c header inclusion a tiny bit
The header inclusion in mtracebis.c should include zebra.h
and not config.h.  There are other issues that need to
be worked through as well, but we can do this in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-02 16:07:48 -04:00
David Lamparter b45ac5f5c6 *: fix config.h/zebra.h include order
config.h (or, transitively, zebra.h) must be the first include file
listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work
correctly.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
paco 813099f0fc
pimd: untrusted argument (3) (Coverity 1465491)
Additional fix over d94023d85c (PR #2546)

Removed all pointer arithmetic used for the checks, while keeping same
coverage. I hope this removes the Coverity warning (If this don't fix it, I'll
make Coverity work with a fork and try there as many times as necessary)

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-26 17:14:36 +02:00
paco d94023d85c
pimd: untrusted argument (2) (Coverity 1465491)
Additional fix over 18e994a043 (PR #2457)

Previous correction was not enough for fixing the Coverity warning. Now we
ensure we don't overflow the buffer.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-25 17:37:48 +02:00
paco a2b6e694b1
bgpd isisd ldpd lib ospfd pimd: redundancy (infer)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-20 22:25:28 +02:00
paco 18e994a043
pimd: Untrusted val as argument (Coverity 1465491)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-15 14:46:25 +02:00
Mladen Sablic 71e55fb257 pimd: adding querying of state to mtrace
Adding to mtracebis querying with group address. Same change
to vtysh mtrace command. Support for querying (S,G) and (*,G)
state in mtrace router code. Further improvments to mtrace router
code with closer complience to IETF draft. More references in
comments to the draft. Man page has been updated accordingly.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-04-24 18:47:50 +02:00
Quentin Young d7c0a89a3a
*: use C99 standard fixed-width integer types
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t

Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-27 15:13:34 -04:00
Mladen Sablic 04a2eef368 pimd: improvments to mtrace
mtracebis has been updated, so it behaves more like the original
mtrace command.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-03-14 11:51:35 +01:00
Lou Berger 996c93142d *: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:04:32 -05:00
Donald Sharp 5b02bd3ad0 pimd: Fix some compiler issues
Fix some compiler issues that were not picked up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-02-23 02:07:47 -05:00
Mladen Sablic 4d9ad5dcd0 pimd: Multicast traceroute client and router
This commit is the implementation of weak multicast traceroute.
It consists of IGMP module dealing with mtrace type IGMP messages
and client program mtrace/mtracebis for initiating mtrace queries.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-02-19 23:13:55 +01:00