Yes, I have a problem with any government worker, elected official, or service member that trades their experience, knowledge, and access to a foreign government. They are traitors and should be treated as such. BTW, I think I read that there is legislation pending to reign this in but I suspect it will be more smoke and mirrors than real.
Is it against the law? No, and it will likely never be, because plenty of people on both sides of the aisle use it to their personal advantage. You're whining about something you have no control over, and never will.