Checking the interface name is kind of brittle. In the age of network namespaces and containers, there is no reason a loopback interface can’t be called differently.
Check for the IFF_LOOPBACK
flag to detect loopback interface instead.
Also remove a misleading comment in Discover’s doc comment.