ifstate 1.13.4__tar.gz → 1.13.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {ifstate-1.13.4 → ifstate-1.13.5}/PKG-INFO +1 -1
  2. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate.egg-info/PKG-INFO +1 -1
  3. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/__init__.py +1 -1
  4. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/util.py +6 -0
  5. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/wireguard/__init__.py +8 -2
  6. {ifstate-1.13.4 → ifstate-1.13.5}/LICENSE +0 -0
  7. {ifstate-1.13.4 → ifstate-1.13.5}/README.md +0 -0
  8. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate/__init__.py +0 -0
  9. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate/ifstate.py +0 -0
  10. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate/shell.py +0 -0
  11. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate/vrrp.py +0 -0
  12. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate.egg-info/SOURCES.txt +0 -0
  13. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate.egg-info/dependency_links.txt +0 -0
  14. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate.egg-info/entry_points.txt +0 -0
  15. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate.egg-info/requires.txt +0 -0
  16. {ifstate-1.13.4 → ifstate-1.13.5}/ifstate.egg-info/top_level.txt +0 -0
  17. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/address/__init__.py +0 -0
  18. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/bpf/__init__.py +0 -0
  19. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/bpf/ctypes.py +0 -0
  20. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/bpf/map.py +0 -0
  21. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/brport/__init__.py +0 -0
  22. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/exception.py +0 -0
  23. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/fdb/__init__.py +0 -0
  24. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/link/__init__.py +0 -0
  25. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/link/base.py +0 -0
  26. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/link/dsa.py +0 -0
  27. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/link/physical.py +0 -0
  28. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/link/tun.py +0 -0
  29. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/link/veth.py +0 -0
  30. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/log.py +0 -0
  31. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/neighbour/__init__.py +0 -0
  32. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/netns/__init__.py +0 -0
  33. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/parser/__init__.py +0 -0
  34. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/parser/base.py +0 -0
  35. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/parser/yaml.py +0 -0
  36. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/routing/__init__.py +0 -0
  37. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/sysctl/__init__.py +0 -0
  38. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/tc/__init__.py +0 -0
  39. {ifstate-1.13.4 → ifstate-1.13.5}/libifstate/xdp/__init__.py +0 -0
  40. {ifstate-1.13.4 → ifstate-1.13.5}/schema/ifstate.conf.schema.json +0 -0
  41. {ifstate-1.13.4 → ifstate-1.13.5}/setup.cfg +0 -0
  42. {ifstate-1.13.4 → ifstate-1.13.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ifstate
3
- Version: 1.13.4
3
+ Version: 1.13.5
4
4
  Summary: Manage host interface settings in a declarative manner
5
5
  Home-page: https://ifstate.net/
6
6
  Author: Thomas Liske
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ifstate
3
- Version: 1.13.4
3
+ Version: 1.13.5
4
4
  Summary: Manage host interface settings in a declarative manner
5
5
  Home-page: https://ifstate.net/
6
6
  Author: Thomas Liske
@@ -48,7 +48,7 @@ import json
48
48
  import errno
49
49
  import logging
50
50
 
51
- __version__ = "1.13.4"
51
+ __version__ = "1.13.5"
52
52
 
53
53
 
54
54
  class IfState():
@@ -200,6 +200,12 @@ class NetNSExt(NetNS):
200
200
  def __init__(self, *args, **kwargs):
201
201
  super().__init__(*args, **kwargs)
202
202
 
203
+ # pyroute 0.9.1+
204
+ # workaround: netns property was moved into the status dict
205
+ if not hasattr(self, "netns"):
206
+ assert(hasattr(self, "status"))
207
+ self.netns = self.status["netns"]
208
+
203
209
  try:
204
210
  netns.pushns(self.netns)
205
211
  self.__sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@@ -56,9 +56,15 @@ class WireGuard():
56
56
  try:
57
57
  state = self.wg.get_interface(
58
58
  self.iface, spill_private_key=True, spill_preshared_keys=True)
59
- except Exception as err:
59
+ except TypeError as err:
60
+ # wgnlpy 0.1.5 can triggger a TypeError exception
61
+ # if the WGPEER_A_LAST_HANDSHAKE_TIME NLA does not
62
+ # return an integer
63
+ # https://github.com/argosyLabs/wgnlpy/pull/5
60
64
  logger.warning('WireGuard on {} failed: {}'.format(
61
- self.iface, err.args[1]))
65
+ self.iface, err.args[0]))
66
+ # we cannot do anything here, but at least ifstate does not crash
67
+ # with an unhandled exception from inside wgnlpy
62
68
  return
63
69
 
64
70
  # check base settings (not the peers, yet)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes