STP UDLD and Autonegotiation
When using fiber links, UDLD uses a device's autonegotiation status in order to determine of a unidirectional link has been detected or not.
Specifically, a unidirectional link occurs whenever traffic transmitted by the local device over a link is received by the neighbor but traffic transmitted from the neighbor is not received by the local device.
If one of the fiber strands in a pair is disconnected, as long as autonegotiation is active, the link does not stay up. In this case, the logical link is undetermined, and UDLD does not take any action.
If both fibers are working normally at Layer 1, then UDLD at Layer 2 determines whether those fibers are connected correctly and whether traffic is flowing bidirectionally between the correct neighbors.
This check cannot be performed by autonegotiation, because autonegotiation operates at Layer 1.
Links
https://forum.networklessons.com/t/spanning-tree-loopguard-and-udld/1145/56?u=lagapides