diff options
author | anlan_cs <vic.lan@pica8.com> | 2022-01-18 11:00:45 +0100 |
---|---|---|
committer | anlan_cs <vic.lan@pica8.com> | 2022-01-18 11:19:54 +0100 |
commit | 95fd223cc3a7a6f7cdefebf39934c74e15091b6a (patch) | |
tree | 02328600cc44b894fe81ee6c309652a073000645 /bfdd | |
parent | Merge pull request #10349 from anlancs/doc-ospf-no (diff) | |
download | frr-95fd223cc3a7a6f7cdefebf39934c74e15091b6a.tar.xz frr-95fd223cc3a7a6f7cdefebf39934c74e15091b6a.zip |
bfdd: fix the possibly wrong counter of control packets
Since control packets may be dropped by ttl check, the counter
operation should be put after all check including ttl check.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfd_packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 652b91411..839f06329 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -639,8 +639,6 @@ int bfd_recv_cb(struct thread *t) return 0; } - bfd->stats.rx_ctrl_pkt++; - /* * Multi hop: validate packet TTL. * Single hop: set local address that received the packet. @@ -656,6 +654,8 @@ int bfd_recv_cb(struct thread *t) bfd->local_address = local; } + bfd->stats.rx_ctrl_pkt++; + /* * If no interface was detected, save the interface where the * packet came in. |