We know that in the OSI or TCP-IP model, the higher layer utilizes the services offered by the lower layer. For example, the data link layer uses services offered by the physical layer, network layer uses services offered by the data link layer and so on.
However, I find that some protocols uses services provided by the protocols in the layers above them. For example, both BGP and RIP perform routing which is usually considered as network layer functionality. BGP uses TCP while RIP uses UDP. So here protocols at the network layer which are using services from the protocols in the transport layer. That's why some people online argue that BGP & RIP should be associated at least at the transport layer, while some say that these are application layer protocols as they use services of transport layers, and in TCP-IP model above transport layer there is only application layer.
I understand both BGP and RIP perform mostly network layer functionality of routing. What's the truth/convention?