implemented more validation checks about incoming responses per RFC2080, and one additional heuristic check for safer operation. Obtained from: KAME