Donald Sharp
c6d94a7056
*: zebra.h should not have fcntl.h
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-09 12:50:40 -05:00
sri-mohan1
233b5d0f2e
ldpd: changes for code maintainability
...
these changes are for improving the code maintainability and readability
Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-06-05 10:53:27 +05:30
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
Donatas Abraitis
c4efd0f423
*: Do not cast to the same type
...
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-08 17:15:06 +03:00
Donald Sharp
6cd8093d32
ldpd: During code inspection we are mixing data sizes
...
As I understand it ldpd was originally developed as a standalone
daemon for *BSD land. Then ported to FRR. FRR uses ifindex_t
as the base type for the ifindex. Mixing `unsigned short` and
`int` and `unsigned int` is going to lead to fun somewhere
along the way. Especially when we get to run on a system
with ifindex churn( I'm looking at you docker ).
Attempt to convert all of ldpd to think of the ifindex as a
`ifindex_t`.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-11 09:03:17 -04:00
Donald Sharp
f67de3ee72
ldpd: Cleanup set but unused variables
...
There existed some variables set but never used. Clean this up.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-27 09:41:58 -05:00
David Lamparter
0cf6db21ec
*: frr_elevate_privs -> frr_with_privs
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-03 17:18:35 +02:00
Mark Stapp
c00ba1da70
ldpd: fix missing return value in bindany
...
One of the socket utilities was missing a return value in
one of its ifdef'd paths.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-16 16:35:10 -05:00
Rafael Zalamena
1ef00571f8
ldpd: add support for FreeBSD IP_BINDANY
...
Add yet another way to setsockopt a socket to listen to a foreign
address.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-12-21 19:33:48 -02:00
David Lamparter
6bb30c2cba
*: use frr_elevate_privs() (2/2: manual)
...
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-14 20:02:05 +00:00
David Lamparter
01b9e3fd0d
*: use frr_elevate_privs() (1/2: coccinelle)
...
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-14 20:02:05 +00:00
F. Aragon
4149ef7c0f
ldpd: buffer underflow, thread safety (PVS-Studio)
...
This commit fixes two issues:
- memcpy() using containers of different sizes when using addr2sa(), mixing
'struct sockaddr_storage' and 'union sockunion'.
- addr2sa() function not being thread safe (using a local static variable as
container.
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-04 00:01:22 +02:00
Renato Westphal
07bc383384
ldpd: add missing privilege dropping on error path
...
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-01-03 22:03:28 -02:00
Renato Westphal
c5bdb09fd9
*: create a helper function to set the IP_MULTICAST_LOOP sockoption
...
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-11-25 11:46:06 -02:00
Renato Westphal
eac6e3f027
ldpd: adapt the code for Quagga
...
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23 09:31:09 -04:00
Renato Westphal
8429abe0c2
ldpd: copy original sources from OpenBSD (14/09/2016)
...
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23 09:31:05 -04:00