r6040: fix link checking with switches