sync with KAME to simplify rev 1.28's patch (no functional changes)
sync with KAME to simplify rev 1.28's patch (no functional changes)

Obtained from: KAME
Reviewd by: fenner
Approved by: re (jhb)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase