Russ White
17c93806a0
Merge pull request #10555 from anlancs/doc-comment
...
doc: add "cost" to ospfd "range" command
2022-02-15 12:58:28 -05:00
Russ White
02c29fab18
Merge pull request #10562 from donaldsharp/starv_warn
...
lib: Save number of times a thread is starved
2022-02-15 12:57:39 -05:00
Donald Sharp
b17826b715
bgp: Add a 15 minute warning to missing policy
...
Add a 15 minute warning to the logging system when
bgp policy is not setup properly. Operators keep asking
about the missing policy( on upgrade typically ). Let's
try to give them a bit more of a hint when something is
going wrong as that they are clearly missing the other
various places FRR tells them about it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-15 12:40:38 -05:00
Donald Sharp
264274daed
doc: List DEFUN as deprecated
...
New development should use DEFPY. Document this
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-15 12:35:09 -05:00
Donald Sharp
e605a2391a
doc: Update documentation to state new code must use latest approved methods
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-15 12:35:09 -05:00
Russ White
f8e665084d
Merge pull request #10573 from ton31337/fix/doc_rc_tag
...
doc: An example how we do RC tagging for stabilization branch
2022-02-15 11:33:02 -05:00
anlan_cs
c0d217c4e8
pimd: remove redundant code
...
`ifchannel_rb` is already cleaned by `pim_ifchannel_delete_all`, so
it should be removed.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-02-15 22:49:37 +08:00
Donatas Abraitis
1e5c949d36
Merge pull request #10577 from donaldsharp/speeling
...
Speeling
2022-02-14 22:17:54 +02:00
Donald Sharp
b9d95135a8
zebra: Fix spelling mistake
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:56:44 -05:00
Donald Sharp
dfd4f44ffc
yang: Fix spelling mistake
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:56:21 -05:00
Donald Sharp
11743d1041
vtysh: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:56:04 -05:00
Donald Sharp
e1f79be5ed
tests: Fix spelling and grammar mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:55:20 -05:00
Donald Sharp
3d05c4bdcb
pceplib: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:54:05 -05:00
Donald Sharp
1373ad765a
pathd: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:53:48 -05:00
Donald Sharp
1461559c24
ospfd: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:53:16 -05:00
Donald Sharp
bbf5104c5b
ospf6d: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:52:05 -05:00
Donald Sharp
e6f83fc56a
doc: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:51:22 -05:00
Donald Sharp
1da3a6c69a
bgpd: Fix spelling mistakes
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:50:58 -05:00
Abhinay Ramesh
42bfee18c2
ospf6d: fix coverity issues.
...
Fixed below coverity issues
________________________________________________________________________________________________________
*** CID 1511366: (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2631 in ospf6_make_lsupdate_list()
2625 + OSPF6_HEADER_SIZE)
2626 > ospf6_packet_max(on->ospf6_if)) {
2627 ospf6_fill_header(on->ospf6_if, (*op)->s,
2628 length + OSPF6_HEADER_SIZE);
2629 (*op)->length = length + OSPF6_HEADER_SIZE;
2630 ospf6_fill_lsupdate_header((*op)->s, *lsa_cnt);
>>> CID 1511366: (TAINTED_SCALAR)
>>> Passing tainted variable "(*op)->length" to a tainted sink.
2631 ospf6_send_lsupdate(on, NULL, *op);
2632
2633 /* refresh packet */
2634 *op = ospf6_packet_new(on->ospf6_if->ifmtu);
2635 length = OSPF6_LS_UPD_MIN_SIZE;
2636 *lsa_cnt = 0;
/ospf6d/ospf6_message.c: 2631 in ospf6_make_lsupdate_list()
2625 + OSPF6_HEADER_SIZE)
2626 > ospf6_packet_max(on->ospf6_if)) {
2627 ospf6_fill_header(on->ospf6_if, (*op)->s,
2628 length + OSPF6_HEADER_SIZE);
2629 (*op)->length = length + OSPF6_HEADER_SIZE;
2630 ospf6_fill_lsupdate_header((*op)->s, *lsa_cnt);
>>> CID 1511366: (TAINTED_SCALAR)
>>> Passing tainted variable "(*op)->length" to a tainted sink.
2631 ospf6_send_lsupdate(on, NULL, *op);
________________________________________________________________________________________________________
*** CID 1511365: (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2674 in ospf6_make_ls_retrans_list()
2669 if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT)
2670 (*op)->dst = allspfrouters6;
2671 else
2672 (*op)->dst = on->linklocal_addr;
2673
>>> CID 1511365: (TAINTED_SCALAR)
>>> Passing tainted variable "(*op)->length" to a tainted sink.
2674 ospf6_fill_hdr_checksum(on->ospf6_if, *op);
2675 ospf6_packet_add(on->ospf6_if, *op);
2676 OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);
/ospf6d/ospf6_message.c: 2674 in ospf6_make_ls_retrans_list()
2669 if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT)
2670 (*op)->dst = allspfrouters6;
2671 else
2672 (*op)->dst = on->linklocal_addr;
2673
>>> CID 1511365: (TAINTED_SCALAR)
>>> Passing tainted variable "(*op)->length" to a tainted sink.
2674 ospf6_fill_hdr_checksum(on->ospf6_if, *op);
2675 ospf6_packet_add(on->ospf6_if, *op);
2676 OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);
/ospf6d/ospf6_message.c: 2674 in ospf6_make_ls_retrans_list()
2668 ospf6_fill_lsupdate_header((*op)->s, *lsa_cnt);
2669 if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT)
2670 (*op)->dst = allspfrouters6;
2671 else
2672 (*op)->dst = on->linklocal_addr;
2673
>>> CID 1511365: (TAINTED_SCALAR)
>>> Passing tainted variable "(*op)->length" to a tainted sink.
2674 ospf6_fill_hdr_checksum(on->ospf6_if, *op);
2675 ospf6_packet_add(on->ospf6_if, *op);
2676 OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);
________________________________________________________________________________________________________
*** CID 1511364: Insecure data handling (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2125 in ospf6_write()
2120 if (oi->at_data.flags != 0) {
2121 at_len = ospf6_auth_len_get(oi);
2122 if (at_len) {
2123 iovector[0].iov_len =
2124 ntohs(oh->length) + at_len;
>>> CID 1511364: Insecure data handling (TAINTED_SCALAR)
>>> Passing tainted variable "iovector[0].iov_len" to a tainted sink.
2125 ospf6_auth_digest_send(oi->linklocal_addr, oi,
2126 oh, at_len,
2127 iovector[0].iov_len);
2128 } else {
2129 iovector[0].iov_len = ntohs(oh->length);
2130 }
________________________________________________________________________________________________________
*** CID 1511363: (DEADCODE)
/ospf6d/ospf6_auth_trailer.c: 275 in ospf6_hash_hmac_sha_digest()
269 case KEYCHAIN_ALGO_HMAC_SHA512:
270 #ifdef CRYPTO_OPENSSL
271 sha512_digest(mes, len, digest);
272 #endif
273 break;
274 case KEYCHAIN_ALGO_NULL:
>>> CID 1511363: (DEADCODE)
>>> Execution cannot reach this statement: "case KEYCHAIN_ALGO_MAX:".
275 case KEYCHAIN_ALGO_MAX:
276 default:
/ospf6d/ospf6_auth_trailer.c: 274 in ospf6_hash_hmac_sha_digest()
269 case KEYCHAIN_ALGO_HMAC_SHA512:
270 #ifdef CRYPTO_OPENSSL
271 sha512_digest(mes, len, digest);
272 #endif
273 break;
>>> CID 1511363: (DEADCODE)
>>> Execution cannot reach this statement: "case KEYCHAIN_ALGO_NULL:".
274 case KEYCHAIN_ALGO_NULL:
275 case KEYCHAIN_ALGO_MAX:
276 default:
________________________________________________________________________________________________________
*** CID 1511362: Insecure data handling (TAINTED_SCALAR)
/ospf6d/ospf6_auth_trailer.c: 541 in ospf6_auth_check_digest()
535
536 auth_len = ntohs(ospf6_auth->length);
537
538 memcpy(temp_hash, ospf6_auth->data, hash_len);
539 memcpy(ospf6_auth->data, apad, hash_len);
540
>>> CID 1511362: Insecure data handling (TAINTED_SCALAR)
>>> Passing tainted variable "oh_len + auth_len + lls_block_len" to a tainted sink.
541 ospf6_auth_update_digest(oi, oh, ospf6_auth, auth_str,
542 (oh_len + auth_len + lls_block_len),
543 hash_algo);
________________________________________________________________________________________________________
*** CID 1511361: Insecure data handling (TAINTED_SCALAR)
/ospf6d/ospf6_auth_trailer.c: 124 in ospf6_auth_hdr_dump_recv()
118 at_len = length - (oh_len + lls_len);
119 if (at_len > 0) {
120 ospf6_at_hdr =
121 (struct ospf6_auth_hdr *)((uint8_t *)ospfh + oh_len);
122 at_hdr_len = ntohs(ospf6_at_hdr->length);
123 hash_len = at_hdr_len - OSPF6_AUTH_HDR_MIN_SIZE;
>>> CID 1511361: Insecure data handling (TAINTED_SCALAR)
>>> Passing tainted variable "hash_len" to a tainted sink.
124 memcpy(temp, ospf6_at_hdr->data, hash_len);
125 temp[hash_len] = '\0';
________________________________________________________________________________________________________
*** CID 1482146: Insecure data handling (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2787 in ospf6_lsupdate_send_neighbor_now()
2781
2782 if (IS_OSPF6_DEBUG_FLOODING
2783 || IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, SEND_HDR))
2784 zlog_debug("%s: Send lsupdate with lsa %s (age %u)", __func__,
2785 lsa->name, ntohs(lsa->header->age));
2786
>>> CID 1482146: Insecure data handling (TAINTED_SCALAR)
>>> Passing tainted variable "op->length" to a tainted sink.
2787 ospf6_send_lsupdate(on, NULL, op);
Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2022-02-14 06:36:02 +00:00
David Lamparter
29fd9fca45
pim6d: IPv6-adjust pim_msg_send() and related
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
2b844385dc
pim6d: IPv6-adjust pim_ifchannel_*
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
efd66f7bad
pim6d: IPv6-adjust assert-related addrs
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
da6bed2bbe
pim6d: IPv6-adjust jp_agg->group
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
034db86b72
pim6d: IPv6-adjust iface primary/DR addrs
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
01adb431d3
pim6d: IPv6-adjust pim_upstream addr
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
11928ecf19
pim6d: IPv6-adjust Hello/TLV processing
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
9bb93fa04e
pim6d: IPv6-adjust neigh->source_addr
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
c631920c15
pim6d: IPv6-adjust various pim_sgaddr uses
...
Since `pim_sgaddr` is `pim_addr` now, that causes a whole lot of fallout
anywhere S,G pairs are handled.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
80d9fa1e68
pim6d: prepare SSM/filter functions
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
5d99ebea32
pim6d: prepare/stub pim_rp_* functions for IPv6
...
These are sprinkled relatively widely through the PIM codebase, so for
the time being reduce the "compiler warning surface" by moving them
forward to proper types without actual implementations.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
0d36009204
pim6d: more TLV parse/encode IPv6 preparation
...
More proliferation of pim_addr to work towards IPV6.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
16763d77a3
pim6d: prepare IPv6 address encoding functions
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
David Lamparter
883052c6f9
pim6d: convert address comparison in I_am_DR macro
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14 06:45:03 +01:00
Donatas Abraitis
0a3fa828f8
doc: An example how we do RC tagging for stabilization branch
...
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-13 21:23:53 +02:00
Mark Stapp
348698095d
zebra: make netlink object hash threadsafe
...
The recently-added hashtable of nlsock objects needs to be
thread-safe: it's accessed from the main and dplane pthreads.
Add a mutex for it, use wrapper apis when accessing it. Add
a per-OS init/terminate api so we can do init that's not
per-vrf or per-namespace.
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-02-11 17:03:26 -05:00
Jafar Al-Gharaibeh
d10b16499c
Merge pull request #10533 from taspelund/ip_rule_nl_debugs
...
zebra: add netlink debugs for ip rules
2022-02-11 11:37:40 -06:00
Donatas Abraitis
f7d8698313
Merge pull request #9697 from SaiGomathiN/igmp-sources
...
pimd: json support added
2022-02-11 07:53:02 +02:00
ron
1c7c9ba037
lib: not thread off when schedule
...
Signed-off-by: ron <lyq140hf2006@163.com>
2022-02-11 11:27:11 +08:00
Trey Aspelund
e54cd97838
zebra: cleanup multiline strings in debug_nl.c
...
NetDEF CI has been whining about multiline string style.
Make the strings single-line and call it a day.
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2022-02-10 21:37:45 +00:00
Trey Aspelund
95fe32880f
zebra: add netlink debugs for ip rules
...
Adds functions to parse + decode netlink rules.
Adds RTM_NEWRULE + RTM_DELRULE to "debug zebra kernel".
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2022-02-10 21:36:34 +00:00
Russ White
6142a17949
Merge pull request #8890 from rameshabhinay/ospf6_auth_trailer
...
OSPF6: Support OSPF6 authentication trailer RFC 7166
2022-02-10 14:17:13 -05:00
Donald Sharp
1dd08c2243
lib: Save number of times a thread is starved
...
Add a counter to the number of times a thread is starved from
a timer event and add the output to `show thread cpu`
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-10 14:10:26 -05:00
Jafar Al-Gharaibeh
3c07b475c6
doc: mixing ip ospf
and network
commands is not supported
...
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2022-02-10 10:28:00 -06:00
kiselev99@gmail.com
eca3256db8
zebra: FPM next hop weights
...
Don't lose next hop weights while exporting via FPM
Signed-off-by: Alex Kiselev <alex@bisonrouter.com>
2022-02-10 19:16:33 +03:00
Rafael Zalamena
70d79c359b
Merge pull request #10537 from mjstapp/fix_dplane_strdup
...
zebra: use frr mem apis in dplane
2022-02-10 10:24:22 -03:00
Donald Sharp
7fe008261e
Merge pull request #10552 from idryzhov/frr-reload-nodes
...
tools: fix frr-reload context keywords
2022-02-10 08:12:07 -05:00
Donatas Abraitis
cd03cf1644
Merge pull request #10540 from idryzhov/attr-extra-revert
...
revert recent bgp attr->extra changes
2022-02-10 14:46:49 +02:00
Igor Ryzhov
e49889387e
Merge pull request #10545 from ton31337/feature/get_set_for_lcommunity
...
bgpd: Use get/set helpers for attr->lcommunity
2022-02-10 15:35:21 +03:00
Donatas Abraitis
1bcf3a96de
bgpd: Use get/set helpers for attr->lcommunity
...
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-10 11:04:03 +02:00
Igor Ryzhov
a2d3103a01
Revert "bgpd: Move out ipv6_ecommunity struct from attr to attr_extra"
...
This reverts commit 2703b7db19
.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2022-02-10 12:00:30 +03:00