mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 21:20:48 +00:00
isisd,tests,doc: Rename hello padding sometimes to hello padding during-adjacency-formation
Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
This commit is contained in:
parent
d73b209a42
commit
06fbbf2935
@ -206,7 +206,7 @@ ISIS interface
|
||||
|
||||
Add padding to IS-IS hello packets.
|
||||
|
||||
.. clicmd:: isis hello padding sometimes
|
||||
.. clicmd:: isis hello padding during-adjacency-formation
|
||||
|
||||
Add padding to IS-IS hello packets during adjacency formation only.
|
||||
|
||||
|
@ -1327,9 +1327,9 @@ static int isis_interface_config_write(struct vty *vty)
|
||||
vty_out(vty, " no " PROTO_NAME " hello padding\n");
|
||||
write++;
|
||||
break;
|
||||
case ISIS_HELLO_PADDING_SOMETIMES:
|
||||
case ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION:
|
||||
vty_out(vty, PROTO_NAME
|
||||
" hello padding sometimes\n");
|
||||
" hello padding during-adjacency-formation\n");
|
||||
write++;
|
||||
break;
|
||||
case ISIS_HELLO_PADDING_ALWAYS:
|
||||
|
@ -69,7 +69,7 @@ struct isis_circuit_arg {
|
||||
enum isis_hello_padding {
|
||||
ISIS_HELLO_PADDING_ALWAYS,
|
||||
ISIS_HELLO_PADDING_DISABLED,
|
||||
ISIS_HELLO_PADDING_SOMETIMES
|
||||
ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION
|
||||
};
|
||||
|
||||
struct isis_circuit {
|
||||
|
@ -2240,7 +2240,7 @@ void cli_show_ip_isis_threeway_shake(struct vty *vty,
|
||||
* XPath: /frr-interface:lib/interface/frr-isisd:isis/hello/padding
|
||||
*/
|
||||
DEFPY_YANG(isis_hello_padding, isis_hello_padding_cmd,
|
||||
"[no] isis hello padding [sometimes]$padding_type",
|
||||
"[no] isis hello padding [during-adjacency-formation]$padding_type",
|
||||
NO_STR
|
||||
"IS-IS routing protocol\n"
|
||||
"Type of padding for IS-IS hello packets\n"
|
||||
@ -2266,8 +2266,8 @@ void cli_show_ip_isis_hello_padding(struct vty *vty,
|
||||
if (hello_padding_type == ISIS_HELLO_PADDING_DISABLED)
|
||||
vty_out(vty, " no");
|
||||
vty_out(vty, " isis hello padding");
|
||||
if (hello_padding_type == ISIS_HELLO_PADDING_SOMETIMES)
|
||||
vty_out(vty, " sometimes");
|
||||
if (hello_padding_type == ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION)
|
||||
vty_out(vty, " during-adjacency-formation");
|
||||
vty_out(vty, "\n");
|
||||
}
|
||||
|
||||
|
@ -299,8 +299,8 @@ const char *isis_hello_padding2string(int hello_padding_type)
|
||||
switch (hello_padding_type) {
|
||||
case ISIS_HELLO_PADDING_DISABLED:
|
||||
return "no";
|
||||
case ISIS_HELLO_PADDING_SOMETIMES:
|
||||
return "sometimes";
|
||||
case ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION:
|
||||
return "during-adjacency-formation";
|
||||
case ISIS_HELLO_PADDING_ALWAYS:
|
||||
return "yes";
|
||||
}
|
||||
|
@ -1966,7 +1966,8 @@ int send_hello(struct isis_circuit *circuit, int level)
|
||||
|
||||
bool should_pad_hello =
|
||||
circuit->pad_hellos == ISIS_HELLO_PADDING_ALWAYS ||
|
||||
(circuit->pad_hellos == ISIS_HELLO_PADDING_SOMETIMES &&
|
||||
(circuit->pad_hellos ==
|
||||
ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION &&
|
||||
circuit->upadjcount[0] + circuit->upadjcount[1] == 0);
|
||||
|
||||
if (isis_pack_tlvs(tlvs, circuit->snd_stream, len_pointer,
|
||||
|
@ -2162,7 +2162,8 @@ static uint8_t *isis_snmp_find_circ(struct variable *v, oid *name,
|
||||
* return false if lan hellos must be padded
|
||||
*/
|
||||
if (circuit->pad_hellos == ISIS_HELLO_PADDING_ALWAYS ||
|
||||
(circuit->pad_hellos == ISIS_HELLO_PADDING_SOMETIMES &&
|
||||
(circuit->pad_hellos ==
|
||||
ISIS_HELLO_PADDING_DURING_ADJACENCY_FORMATION &&
|
||||
circuit->upadjcount[0] + circuit->upadjcount[1] == 0))
|
||||
return SNMP_INTEGER(ISIS_SNMP_TRUTH_VALUE_FALSE);
|
||||
|
||||
|
@ -572,9 +572,9 @@ def test_isis_advertise_passive_only():
|
||||
assert result is True, result
|
||||
|
||||
|
||||
def test_isis_hello_padding_sometimes():
|
||||
def test_isis_hello_padding_during_adjacency_formation():
|
||||
"""Check that IIH packets is only padded when adjacency is still being formed
|
||||
when isis hello padding sometimes is configured
|
||||
when isis hello padding during-adjacency-formation is configured
|
||||
"""
|
||||
tgen = get_topogen()
|
||||
net = get_topogen().net
|
||||
@ -582,7 +582,7 @@ def test_isis_hello_padding_sometimes():
|
||||
if tgen.routers_have_failure():
|
||||
pytest.skip(tgen.errors)
|
||||
|
||||
logger.info("Testing isis hello padding sometimes behavior")
|
||||
logger.info("Testing isis hello padding during-adjacency-formation behavior")
|
||||
r3 = tgen.gears["r3"]
|
||||
|
||||
# Reduce hello-multiplier to make the adjacency go down faster.
|
||||
@ -599,7 +599,7 @@ def test_isis_hello_padding_sometimes():
|
||||
"""
|
||||
configure
|
||||
interface r1-eth0
|
||||
isis hello padding sometimes
|
||||
isis hello padding during-adjacency-formation
|
||||
end
|
||||
debug isis adj-packets
|
||||
"""
|
||||
|
@ -128,7 +128,7 @@ module frr-isisd {
|
||||
description
|
||||
"Do not add any padding to hello packets.";
|
||||
}
|
||||
enum "sometimes" {
|
||||
enum "during-adjacency-formation" {
|
||||
value 2;
|
||||
description
|
||||
"Add padding to hello packets during adjacency formation only.";
|
||||
|
Loading…
Reference in New Issue
Block a user