Fix agent crash on IPv6 GW ping; Closes-bug:#1378352

Change-Id: If0625c87cbd0c38c5d5973fc3b4133a63cade1d4
Merge "Fix agent crash on IPv6 GW ping; Closes-bug:#1378352"