port l2tpd fixes from changeset:2696 to trunk.