routing: simplify malloc flags in alloc_nhgrp().
(cherry picked from commit 639d7abec6cd31db9d240d6439fe6098b19eb3d8)