diff options
| author | anlan_cs <vic.lan@pica8.com> | 2022-01-18 05:00:45 -0500 | 
|---|---|---|
| committer | anlan_cs <vic.lan@pica8.com> | 2022-01-18 05:19:54 -0500 | 
| commit | 95fd223cc3a7a6f7cdefebf39934c74e15091b6a (patch) | |
| tree | 02328600cc44b894fe81ee6c309652a073000645 /bfdd/bfd_packet.c | |
| parent | 3ae667e5275c75148adee1bf216ebdd329d74c0b (diff) | |
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/bfd_packet.c')
| -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 652b914118..839f06329a 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.  | 
