Patches for check_ping dns lookup problem [sf#1469472] [#788]