Hello @Aneek ,
look for the OSPF stub feature.
Here the idea is the following:
increase to the max possible value the metric of each link in the router LSA (65,535 max in 16 bit integers in intra area OSPF route) so that this router will not be used as transit.
This function can be useful after router reload when waiting for BGP to converge the router can be not able to be a exit point to the internet before receiving all the prefixes from upstream provider.
In ISI-IS there is a flag bit in the LSP that is called overload OL that has the same meaning if OL is set the router should not be used as a transit.
Again this can be temporary or permanent
Hope to help
Giuseppe