diff options
| author | Paul Holzinger <pholzing@redhat.com> | 2022-05-31 16:49:40 +0200 |
|---|---|---|
| committer | Matthew Heon <mheon@redhat.com> | 2022-06-14 14:38:23 -0400 |
| commit | bcc302525182607d3a7c732dcb8a40f9a61f1ad6 (patch) | |
| tree | d8dabd0c595b401646a7b4f282030ab01d4ebeb8 /test/python/docker/compat | |
| parent | 5b6252467335656980cb4c3acdd5e7b0e2478429 (diff) | |
| download | podman-bcc302525182607d3a7c732dcb8a40f9a61f1ad6.tar.gz podman-bcc302525182607d3a7c732dcb8a40f9a61f1ad6.tar.bz2 podman-bcc302525182607d3a7c732dcb8a40f9a61f1ad6.zip | |
fix podman container restore without CreateNetNS
When a container does not use the default podman netns, for example
--network none or --network ns:/path a restore would fail because the
specgen check validates that c.config.StaticMAC is nil but the
unmarshaller sets it to an empty slice.
While we could make the check use len() > 0 I feel like it is more
common to check with != nil for ip and mac addresses.
Adding omitempty tag makes the json marshal/unmarshal work correctly.
This should not cause any issues.
Fixes #14389
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/python/docker/compat')
0 files changed, 0 insertions, 0 deletions
