Near-rings with identities on dihedral groups