tl;dr Which is looked at first, longest match or the BGP decision process
I'm taking a course on BGP right now and trying to figure out how these two routing processes work together.
I know that a more specific route is preferred in the router over a less specific one (192.0.0.0/25 will always be chosen over 192.0.0.0/24) I also know how the BGP decision process works (Local pref is looked at before AS_Path, ect)
So my question is, if an AS has 2 neighbors, and it advertises a more specific network to one of them than the other, then some other AS down the line gets both of those advertisements, will longest match take affect automatically and the more specific one will automatically be chosen? Or does the BGP decision process happen first, therefore only one of the routes is put into the route table and longest match has no impact on it at all?
Hope I explained that in a way that makes sense. Thanks for the help