]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: include 0 in configured hold/keepalive
authorTrey Aspelund <taspelund@nvidia.com>
Tue, 28 Jun 2022 14:08:55 +0000 (14:08 +0000)
committerTrey Aspelund <taspelund@nvidia.com>
Tue, 28 Jun 2022 14:58:51 +0000 (14:58 +0000)
commite93d5c298d3ed8b737af0b8b9a9e02f5309048a3
treee5cd88a898d3ef52bf2ef639777f31e4c5e75570
parentd841284b70f295f874705cabe1a96841520394d0
bgpd: include 0 in configured hold/keepalive

The default keepalive/hold timers are always exposed via this commit:
```
commit 9b1b96233d7204263d409ea6c504b316af9e533f (origin/bgp_timer_always_on)
Author: Trey Aspelund <taspelund@nvidia.com>
Date:   Mon Jun 27 23:20:33 2022 +0000

    bgpd: always display keepalive/hold intervals

    `show bgp neighbors <peer> [json]` was only displaying the configured
    keepalive and holdtime intervals when they differed from the default
    values.  Since default config is still config, let's make sure these
    values are always displayed.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
```

However it mistakenly changed the logic to only display the peer's
timers if the configured value was non-zero.  This updates the logic to
check PEER_FLAG_TIMER to determine if the values were configured,
given 0 is a valid value (to disable keepalives).

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
bgpd/bgp_vty.c