mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd->stats.rx_ctrl_pkt++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Multi hop: validate packet TTL.
|
* Multi hop: validate packet TTL.
|
||||||
* Single hop: set local address that received the packet.
|
* 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->local_address = local;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bfd->stats.rx_ctrl_pkt++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If no interface was detected, save the interface where the
|
* If no interface was detected, save the interface where the
|
||||||
* packet came in.
|
* packet came in.
|
||||||
|
Loading…
Reference in New Issue
Block a user