VPN ondemand action -> Disconnect not working properly

In Device management profile, VPN.VPN.OnDemandRulesElement

Action->Disconnect

Example payload:

<key>OnDemandEnabled</key><integer>1</integer><key>OnDemandRules</key> <array><dict> <key>Action</key><string>Disconnect</string><key>InterfaceMatch</key><string>Cellular</string> </dict></array>

When install my vpn payload with above configuration, I was unable to connect vpn manually when i try with wifi interface Based on the doc, VPN should tear down when i connect with specific type interface(here cellular) i was unable to connec the vpn when i'm in cellular network good but when i connect to wifi still the same is happening. Is this a bug? tried in ios 18

VPN ondemand action -&gt; Disconnect not working properly
 
 
Q