Linear separation of connected dominating sets in graphs