Fix mistake on generation_id calculation and return the current generation id in case of OFPCR_ROLE_NOCHANGE. Fix suggested by shh0613