Path-quality monitoring in the presence of adversaries