Wifx / gonetworkmanager

Go D-Bus bindings for NetworkManager
Other
96 stars 42 forks source link

CheckpointCreate ignores the Devices parameter #27

Closed x539 closed 1 year ago

x539 commented 2 years ago

Checkpoints are created for all devices:

    nm, _ := gnm.NewNetworkManager()
    device, _ := nm.GetDeviceByIpIface("wlp0s20f3")
    newCheckpoint, _ := nm.CheckpointCreate([]gnm.Device{device}, 3, 0)
    devices, _ := newCheckpoint.GetPropertyDevices()

    ifaces := make([]string, len(devices))
    for _, device := range devices {
        iface, _ := device.GetPropertyInterface()
        ifaces = append(ifaces, iface)
    }

    fmt.Println(newCheckpoint.GetPath(), ifaces)

Expected output: /org/freedesktop/NetworkManager/Checkpoint/1 [wlp0s20f3]

Actual output: /org/freedesktop/NetworkManager/Checkpoint/20 [ lo docker0 enp0s31f6 vethdba3724 wlp0s20f3 p2p-dev-wlp0s20f3 tun0]