alloc the session only if 'netc' is non-null, return otherwise