nmd is copied for overwriting... But not used. &nmd is to be passed to nm_open instead of g->nmd, or the ringid parameters won't be taken into account... Also set nmd.self for the NM_DESC check.