mirror of
https://github.com/moby/moby.git
synced 2026-08-12 22:16:46 +00:00
netlink offers the netlink.LinkNotFoundError type, which we can use with errors.As() to detect a unused link name. Additionally, early return if GenerateRandomName fails, as reading random bytes should be a highly reliable operation, and otherwise the error would be swallowed by the fall-through return. Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>