Mitigating data plane device compromise in programmable networks