netlink: rework handling of netlink messages