[connectionagent] fix crash when there is no default route