mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
Merge pull request #18598 from zmw12306/nhrp_nexthop
nhrpd: Add Hop Count Validation Before Forwarding in nhrp_peer_recv()
This commit is contained in:
commit
c7a45b1beb
|
@ -1355,6 +1355,11 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb)
|
|||
}
|
||||
break;
|
||||
case NHRP_ROUTE_NBMA_NEXTHOP:
|
||||
if (hdr->hop_count == 0) {
|
||||
nhrp_packet_send_error(&pp, NHRP_ERROR_HOP_COUNT_EXCEEDED, 0);
|
||||
info = "hop count exceeded";
|
||||
goto drop;
|
||||
}
|
||||
nhrp_peer_forward(peer, &pp);
|
||||
break;
|
||||
case NHRP_ROUTE_BLACKHOLE:
|
||||
|
|
Loading…
Reference in a new issue