Commit Graph

9 Commits

Author SHA1 Message Date
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
Renato Westphal
73b3323c37
Merge pull request #1957 from qlyoung/fix-mtrace-unaligned-pointer-access
pimd: fix unaligned pointer access
2018-03-23 12:33:11 -03:00
Donald Sharp
33762ff980
Merge pull request #1931 from msablic/pim_mtrace_router
pimd: mtrace router code improvments and fixes
2018-03-22 18:41:20 -04:00
Mladen Sablic
7fb82673ca pimd: mtrace router code improvments and fixes
Mtrace router code has been fixed for the case where no PIM
interface exists towards the source and next-hop is returned.

fwd_ttl is set to one, for correct reporting of mcast ttl.

Also, NO_MULTICAST error is returned when there is no PIM.

And prev_hop is set to source, for case when connected to source,
to help termination of hop-by-hop queries.

Dependency of logging on PIM, when sending mtrace packet, has been
removed.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-03-22 22:05:28 +01:00
Quentin Young
f75ecf8dc2
pimd: fix unaligned pointer access
Can't take the address of members of packed structures due to potential for
alignment faults on some platforms.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-22 13:33:20 -04:00
Donald Sharp
993b143225 pimd: Fix leaked fd and prevent null pointer deref
When the pim_nexthop_lookup fails, close the opened fd
as part of the failure condition.

Additionally pim_nexthop_lookup assumes that we've
actually already looked up a nexthop in the past.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-19 09:18:10 -04: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