With next-hop recursion enabled, a device can find the IGP route to the next hop for a BGP4 route.
device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# next-hop-recursion