Parser: fix host up/down check.

(Cherry picked from commit c0afe4074edbd2a2fc3b73593ebbf26b1ebc5668)