Commit graph

38 commits

Author SHA1 Message Date
JosiahMg 6e823d288c isisd: vlan-subif isis neighbor
Fixed the problem that physical interfaces can establish isis neighbor
relationships with vlan subinterfaces

Signed-off-by: JosiahMg <JosiahMg@163.com>
2024-08-01 09:09:35 +08:00
Josef Miegl a0956b9522 isisd: pfpacket BPF filter with IS-IS over tunnel support
Signed-off-by: Josef Miegl <josef@miegl.cz>
2023-03-12 16:15:27 +01:00
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
sri-mohan1 11106e287f isisd: changes for code maintainability
these changes are for improving the code maintainability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-08-29 20:37:32 +05:30
Donatas Abraitis 6006b807b1 *: Properly use memset() when zeroing
Wrong: memset(&a, 0, sizeof(struct ...));
    Good:  memset(&a, 0, sizeof(a));

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-11 14:08:47 +03:00
Philippe Guibert b081493527 isisd: add guard debug when compiling with EXTREME_DEBUG
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-03-23 22:29:14 +01:00
Igor Ryzhov 096f7609f9 *: cleanup ifp->vrf_id
Since f60a1188 we store a pointer to the VRF in the interface structure.
There's no need anymore to store a separate vrf_id field.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-22 20:47:23 +03:00
David Lamparter 3efd0893d0 *: un-split strings across lines
Remove mid-string line breaks, cf. workflow doc:

  .. [#tool_style_conflicts] For example, lines over 80 characters are allowed
     for text strings to make it possible to search the code for them: please
     see `Linux kernel style (breaking long lines and strings)
     <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
     and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.

Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 10:37:25 +02:00
Kaushik caa18d497f ISIS VRF: Added vrf_socket and new param in isisd privileges.
1. The socket() call replaced with vrf_socket() in open_packet_socket().
2. One new isisd privileges is added in zebra_capabilities_t [].

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-06-24 05:27:14 -07:00
David Lamparter 2b64873d24 *: generously apply const
const const const your boat, merrily down the stream...

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-02 15:01:29 +01: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
Emanuele Di Pascale 32fed393f4 isisd: support circuits with mtu > 8192
the buffer to read from the socket when processing an incoming
packet was hardcoded to be of size 8192. If the mtu of the
interface is greater than that and hello padding is enabled
on that circuit, the hello message will be truncated, and this
will cause the adjacency establishment to fail. fix this by
using a large enough stack buffer instead

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-05-23 15:50:31 +02:00
David Lamparter 4bef0ec4fb isisd: replace dict_* with DECLARE_RBTREE
Historically, isisd has been carrying around its own red-black tree to
manage its LSP DB in.  This replaces that with the newly-added
DECLARE_RBTREE_*.  This allows completely removing the dict_* code.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-27 19:33:45 +02:00
David Lamparter 633fc9b133 *: frr_elevate_privs whitespace fixes
(... and one superfluous variable removed)

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
Quentin Young af4c27286d *: rename zlog_fer -> flog_err
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Donald Sharp 38937bd540 isisd: Convert to use LIB_ERR_XXX
Where an obvious choice could be made about converting
to a LIB_ERR_XXX function do so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
F. Aragon aa979109f2
isisd: return check (Coverity 1424370)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-28 16:31:37 +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
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 76e292f994 isisd: Allow struct zebra_privs_t to be available
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-23 18:09:23 -04:00
David Lamparter 9d303b37d7 Revert "*: reindent pt. 2"
This reverts commit c14777c6bf.

clang 5 is not widely available enough for people to indent with.  This
is particularly problematic when rebasing/adjusting branches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent c14777c6bf
*: reindent pt. 2
w/ clang 5

* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter 896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00
Christian Franke 316a98ecd1 isisd: implement draft-ietf-isis-ext-eth and support p2p over LAN on BSD
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-04-28 12:03:23 +02:00
Donald Sharp 264f864625 isisd: Fix some various clang warnings
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-01 08:42:19 -04:00
David Lamparter 4fa80053a3 isisd: use BPF on Linux/PF_PACKET
we *really* don't want to receive every single packet (of any protocol
type) coming in on an IS-IS enabled interface.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 17:51:16 +09:00
David Lamparter 3c3877cd7d *: fix some licensing SNAFUs
bgpd/bgpd.c had a typo
zebra/zebra_mpls_netlink.c was derived from rt_netlink.c
isisd/include-netbsd/* are not needed (2 constants moved over)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-14 11:27:08 +09:00
David Lamparter f2bce9a5b3 *: fix signedness mix-ups
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 21401f3215be26dcb0f787105f5907745498e966)
2016-06-07 08:47:49 -04:00
Christian Franke cfd1f27b71 isisd: make send_lsp more robust
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Tested-by: NetDEF CI System <cisystem@netdef.org>
2016-03-29 20:26:34 -04:00
Amritha Nambiar ee773b24a2 isisd: Drop packet received on multiple interfaces due to the time gap in binding socket to an interface
Due to the time window between opening socket and binding it to an interface, the same hello
packet is delivered on multiple interfaces, unique socket per circuit is not yet established.
When such hellos get processed, they form incorrect adjacencies. So, drop the packet that is
received on multiple interfaces because the socket for the circuit is yet to bind to an interface.

V2: Fix warning on sign comparison

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
2016-03-29 20:26:08 -04:00
Donald Sharp 91283e7641 isisd: isisd-warnings.patch
Remove compile warnings for the isisd directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
2015-05-19 18:29:15 -07:00
David Lamparter e8aca32f31 isisd: address Coverity warnings
this fixes a bunch of issues found by Coverity SCAN and flagged as
"high" impact -- although, they're all rather minute issues.

* isisd/isis_adjacency.c: one superfluous check, one possible NULL deref
* isisd/isis_circuit.c: two prefix memory leaks
* isisd/isis_csm.c: one missing break
* isisd/isis_lsp.c: one possible NULL deref
* isisd/isis_pfpacket.c: one error-case fd leak
* isisd/isis_route.c: one isis_route_info memory leak
* isisd/isis_routemap.c: one... fnord
* isisd/isis_tlv.c: one infinite loop

Reported-by: Coverity SCAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12 15:38:08 +01:00
David Lamparter 318c8040ab isisd: always join all IS-IS multicast groups
The socket is only created once when an interface is brought up, and the
multicast groups were joined according to configuration at that point.
This breaks when later switching an interface to another IS-IS level.

Since, for a separate conformance issue (ANVL ISIS-6.4), we should be
inspecting the destination address anyway, the simplest fix here is to
just join all groups unconditionally.  There shouldn't be much traffic
on these anyway, worst case we might be picking up some unrelated
multicast groups due to NIC filter aliasing though...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Tested-by: Martin Winter <mwinter@opensourcerouting.org>
2012-12-12 15:38:07 +01:00
Josh Bailey 3f045a0881 isisd: add Google's changes to IS-IS 2012-04-07 13:54:37 -07:00
David Lamparter 745bf05f58 isisd: change ISIS_METHOD to use C preprocessor
this fixes warnings from vtysh extract.pl by making sure the isis method
files always 'work'. (previously, extract.pl would grab unselected isis
method sources and then complain about missing headers)
2010-04-28 20:15:44 -04:00
Paul Jakma 8bc9805929 [isisd] Commit new files which should have been part of previous commit.. 2007-08-08 11:19:27 +00:00