mdns: add bound check when setting interface as duplicate
mdns: add bound check when setting interface as duplicate

Closes IDF-2787

Partially addresses https://github.com/espressif/esp-idf/issues/6440

espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf