David Petraeus has a theory about Donald Trump’s tough talk to Kim Jong Un concerning the North Korean nuclear-weapons program: The American president isn’t actually talking to Kim, at least not primarily. “This is about China,” which, in accounting for 90 percent of North Korea’s trade and supplying the North with oil, “controls the umbilical cord that literally keeps the lights on in Pyongyang,” said the former CIA director.

Under pressure from the Trump administration, China has committed to substantially reducing trade and financial ties with its neighbor, supporting two rounds of UN Security Council sanctions against the North. But it’s been reluctant to isolate North Korea to such an extent that it endangers its ally in Pyongyang, since the Kim government’s fall could lead to chaos and a refugee crisis along China’s borders, and a reunified Korean peninsula allied with the United States. In threatening to “destroy” the “Little Rocket Man” leading North Korea with unprecedented “fire and fury,” Trump may be trying to persuade Chinese leaders that he’s deadly serious about taking military action against North Korea if diplomacy and sanctions fail to curb its nuclear program—that a second Korean War on China’s doorstep should worry the Chinese more than the potential demise of Kim Jong Un.

Since the North Korean government seems hell-bent on acquiring nuclear weapons, Trump’s goal may be less to persuade Kim to shift course than to get “China’s attention” and impress upon Beijing that “you’ve got to help us stop [the North Korean nuclear program] where it is at the very least [and] get to some negotiations,” Petraeus told CNN’s Jake Tapper at the Washington Ideas Forum, which is organized by The Atlantic.

Still, Petraeus, who was once under consideration for the position of secretary of state in the Trump administration, expressed misgivings about how far Trump had gone with the approach.

“There is something” to the “madman logic” that Richard Nixon famously employed, he said. “Before you get into a crisis, it’s not all that bad if the other side thinks you’re a little bit edgy. Nixon had [his Secretary of State Henry] Kissinger go tell the Soviets, ‘Hey you know Nixon’s under a lot of pressure. He has a drink after dinner. Be careful. Wall on eggshells around this guy.’ And they sort of did. You avoid getting into a crisis.”

But the strategy can go from being an asset to a liability in the midst of a crisis, he added. “The problem is, if you do get into a crisis, you don’t want the other side thinking that you’ve taken the slack out of the trigger already and you’re going to do something that otherwise might be irrational, because they may do it to you first. That’s where my concern is. The rhetoric has to be modulated.”

“Certainly some of the statements are not ones that I necessarily would have advised,” Petraeus noted, in an apparent reference to comments by Trump.

Petraeus suggested that China and the United States launch a “strategic dialogue” to clearly communicate what each side views as acceptable and unacceptable ways to address North Korea’s nuclear program. He argued that China has a major interest in halting and rolling back that program since the failure to do so could spark a massive military buildup in Asia as other countries seek to protect themselves.

“When does South Korea ask for its own nuclear weapons” either through the return of U.S. nuclear weapons that were withdrawn in 1991 or through its own nuclear program? Petraeus asked. “What about Japan, which has already reinterpreted its [pacifist] constitution to allow at least collective self-defense with allies, [including] the U.S. … And then what happens with Vietnam? Do they need a nuclear program? The proliferation aspects to this, the strategic implications, are quite stark.”

Petraeus acknowledged that it’s unclear whether Chinese leaders have taken Trump’s message to heart; the latest statistics show that Chinese trade with North Korea actually rose in August to its highest level since December 2016. That’s “not the direction that we were hoping to go,” he said, but “this is going to play out over months.” The problem, however, is that the Trump administration may not have that kind of time. It takes a long time for economic sanctions to have an impact on their target. And North Korea’s nuclear-weapons program is advancing rapidly. As Joseph Dunford, the chairman of the Joint Chiefs of Staff, told the Senate Armed Services Committee on Tuesday, “Whether it’s three months, or six months, or 18 months,” North Korea will “soon” develop the capability to reach the United States with a nuclear-tipped long-range missile. “We ought to conduct ourselves as though it is just a matter of time and a matter of a very short time.”

Trump is “facing a reality that no other president has faced previously,” Petraeus said. Kim Jong Un, an “impulsive” leader who has exhibited exceptional brutality in dealing with opponents, “will have the capability to hold at risk a U.S. city at least on the West Coast, if not further in, with the combination of the intercontinental ballistic missiles he’s developing and [a] nuclear device that is miniaturized.”

Beyond North Korea, Petraeus backed Trump’s plan to send additional U.S. troops to Afghanistan, noting that in fighting terrorism in that country and elsewhere in North Africa, the Middle East, and Central Asia, “We’re engaged in a generational struggle here and we need to acknowledge that. … Anywhere that there are ungoverned spaces, extremists are going to go exploit them.”

He also voiced approval for the latest version of Trump’s travel ban, which includes new restrictions on travel to the United States from Chad, North Korea, and Venezuela. “I think there’s logic to this, frankly,” Petraeus said. “It includes some non-Muslim countries. The distinguishing feature of these countries is that we do not have the confidence in them with either the way they issue passports, or biometric data, or whatever it may be.” The list can expand or contract depending on how countries perform on those measures, he noted, and the ban is “not something that singles out countries because of their faith.”

Petraeus broke ranks with Trump, albeit gently, on the president’s criticism of athletes for kneeling or engaging in other forms of protest during the national anthem. The general said that he had spent decades in the military “to defend the rights, the freedoms that we hold so dear, including the freedom of expression,” and that he was “disappointed” that “now we have politicized football.” But he also appeared to call out players who are contributing to the politicization of sports. “Let’s just get back,” he said, “to enjoying football and people not having to make political statements at the beginning of the games.”