mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 02:53:55 +00:00
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>
This commit is contained in:
parent
3ae667e527
commit
95fd223cc3
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user