ifstate 1.11.7__tar.gz → 1.11.9__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.
- {ifstate-1.11.7 → ifstate-1.11.9}/PKG-INFO +1 -1
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate/ifstate.py +6 -2
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate.egg-info/PKG-INFO +1 -1
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/__init__.py +11 -2
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/address/__init__.py +8 -3
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/exception.py +3 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/link/base.py +10 -5
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/log.py +2 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/netns/__init__.py +3 -3
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/routing/__init__.py +11 -2
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/util.py +27 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/wireguard/__init__.py +12 -2
- {ifstate-1.11.7 → ifstate-1.11.9}/schema/ifstate.conf.schema.json +151 -89
- {ifstate-1.11.7 → ifstate-1.11.9}/LICENSE +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/README.md +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate/shell.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate/vrrp.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate.egg-info/SOURCES.txt +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate.egg-info/dependency_links.txt +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate.egg-info/entry_points.txt +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate.egg-info/requires.txt +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/ifstate.egg-info/top_level.txt +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/bpf/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/bpf/ctypes.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/bpf/map.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/brport/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/fdb/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/link/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/link/physical.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/link/tun.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/link/veth.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/neighbour/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/parser/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/parser/base.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/parser/yaml.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/sysctl/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/tc/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/libifstate/xdp/__init__.py +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/setup.cfg +0 -0
- {ifstate-1.11.7 → ifstate-1.11.9}/setup.py +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from libifstate.parser import YamlParser
|
4
4
|
from libifstate import __version__, IfState
|
5
|
-
from libifstate.exception import FeatureMissingError, LinkNoConfigFound, LinkCircularLinked, ParserValidationError, ParserOpenError, ParserParseError, ParserIncludeError
|
5
|
+
from libifstate.exception import FeatureMissingError, LinkNoConfigFound, LinkCircularLinked, NetNSNotRoot, ParserValidationError, ParserOpenError, ParserParseError, ParserIncludeError
|
6
6
|
from libifstate.util import logger, IfStateLogging
|
7
7
|
from setproctitle import setproctitle
|
8
8
|
|
@@ -83,6 +83,9 @@ class IfsConfigHandler():
|
|
83
83
|
logger.error(
|
84
84
|
"Config uses unavailable feature: {}".format(ex.feature))
|
85
85
|
raise ex
|
86
|
+
except NetNSNotRoot as ex:
|
87
|
+
logger.error("Must not be run from inside a netns!")
|
88
|
+
raise ex
|
86
89
|
|
87
90
|
|
88
91
|
def shell():
|
@@ -185,7 +188,8 @@ def main():
|
|
185
188
|
ParserParseError,
|
186
189
|
ParserIncludeError,
|
187
190
|
ParserValidationError,
|
188
|
-
FeatureMissingError
|
191
|
+
FeatureMissingError,
|
192
|
+
NetNSNotRoot) as ex:
|
189
193
|
ifslog.quit()
|
190
194
|
exit(ex.exit_code())
|
191
195
|
|
@@ -6,8 +6,9 @@ from libifstate.neighbour import Neighbours
|
|
6
6
|
from libifstate.routing import Tables, Rules, RTLookups
|
7
7
|
from libifstate.parser import Parser
|
8
8
|
from libifstate.tc import TC
|
9
|
-
from libifstate.exception import netlinkerror_classes
|
9
|
+
from libifstate.exception import netlinkerror_classes, NetNSNotRoot
|
10
10
|
import bisect
|
11
|
+
import os
|
11
12
|
import pyroute2
|
12
13
|
|
13
14
|
from pyroute2.netlink.rtnl.ifaddrmsg import IFA_F_PERMANENT
|
@@ -47,7 +48,7 @@ import json
|
|
47
48
|
import errno
|
48
49
|
import logging
|
49
50
|
|
50
|
-
__version__ = "1.11.
|
51
|
+
__version__ = "1.11.9"
|
51
52
|
|
52
53
|
|
53
54
|
class IfState():
|
@@ -119,6 +120,14 @@ class IfState():
|
|
119
120
|
|
120
121
|
self._update(self.root_netns, ifstates)
|
121
122
|
if 'namespaces' in ifstates:
|
123
|
+
# require to called from the root netns
|
124
|
+
try:
|
125
|
+
# assume init runs in the root netns
|
126
|
+
if os.readlink('/proc/1/ns/net') != os.readlink(f'/proc/{os.getpid()}/ns/net'):
|
127
|
+
raise NetNSNotRoot()
|
128
|
+
except OSError as ex:
|
129
|
+
logger.debug(f'root netns test: {ex}')
|
130
|
+
pass
|
122
131
|
self.namespaces = {}
|
123
132
|
self.new_namespaces = []
|
124
133
|
for netns_name, netns_ifstates in ifstates['namespaces'].items():
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from libifstate.util import logger, IfStateLogging
|
2
2
|
from libifstate.exception import netlinkerror_classes
|
3
3
|
from ipaddress import ip_interface
|
4
|
-
from pyroute2.netlink.rtnl.ifaddrmsg import IFA_F_PERMANENT
|
4
|
+
from pyroute2.netlink.rtnl.ifaddrmsg import IFA_F_DADFAILED, IFA_F_PERMANENT
|
5
5
|
|
6
6
|
|
7
7
|
class Addresses():
|
@@ -25,20 +25,25 @@ class Addresses():
|
|
25
25
|
# get active ip addresses
|
26
26
|
ipr_addr = {}
|
27
27
|
addr_add = []
|
28
|
+
addr_dad = []
|
28
29
|
for addr in self.netns.ipr.get_addr(index=idx):
|
30
|
+
flags = addr.get_attr('IFA_FLAGS', 0)
|
29
31
|
ip = ip_interface(addr.get_attr('IFA_ADDRESS') +
|
30
32
|
'/' + str(addr['prefixlen']))
|
33
|
+
if flags & IFA_F_DADFAILED == IFA_F_DADFAILED:
|
34
|
+
logger.debug('{} has failed dad'.format(ip), extra={'iface': self.iface, 'netns': self.netns})
|
35
|
+
addr_dad.append(ip)
|
31
36
|
ipr_addr[ip] = addr
|
32
37
|
|
33
38
|
for addr in self.addresses:
|
34
|
-
if addr in ipr_addr:
|
39
|
+
if addr in ipr_addr and addr not in addr_dad:
|
35
40
|
logger.log_ok('addresses', '= {}'.format(addr.with_prefixlen))
|
36
41
|
del ipr_addr[addr]
|
37
42
|
else:
|
38
43
|
addr_add.append(addr)
|
39
44
|
|
40
45
|
for ip, addr in ipr_addr.items():
|
41
|
-
if not any(ip in net for net in ignore):
|
46
|
+
if addr in addr_dad or not any(ip in net for net in ignore):
|
42
47
|
if not ign_dynamic or ipr_addr[ip]['flags'] & IFA_F_PERMANENT == IFA_F_PERMANENT:
|
43
48
|
logger.log_del('addresses', '- {}'.format(ip.with_prefixlen))
|
44
49
|
try:
|
@@ -76,6 +76,12 @@ class Link(ABC):
|
|
76
76
|
0x88a8: '802.1ad',
|
77
77
|
0x8100: '802.1q',
|
78
78
|
},
|
79
|
+
# === vxlan ===
|
80
|
+
'vxlan_df': {
|
81
|
+
0: 'unset',
|
82
|
+
1: 'set',
|
83
|
+
2: 'inherit',
|
84
|
+
},
|
79
85
|
}
|
80
86
|
attr_value_lookup = {
|
81
87
|
'group': RTLookups.group,
|
@@ -488,7 +494,8 @@ class Link(ABC):
|
|
488
494
|
self.idx = item.index
|
489
495
|
|
490
496
|
if self.idx is not None:
|
491
|
-
self.iface =
|
497
|
+
self.iface = item.netns.ipr.get_link(self.idx)
|
498
|
+
if self.idx is not None and self.iface is not None:
|
492
499
|
permaddr = item.netns.ipr.get_permaddr(self.iface.get_attr('IFLA_IFNAME'))
|
493
500
|
if not permaddr is None:
|
494
501
|
self.iface['permaddr'] = permaddr
|
@@ -548,15 +555,13 @@ class Link(ABC):
|
|
548
555
|
# add link
|
549
556
|
if bind_netns is None or bind_netns.netns == self.netns.netns:
|
550
557
|
self.netns.ipr.link('add', **(settings))
|
551
|
-
link =
|
552
|
-
ifname=settings['ifname'])), None)
|
558
|
+
link = self.netns.ipr.get_link(ifname=settings['ifname'])
|
553
559
|
if link is not None:
|
554
560
|
item = self.ifstate.link_registry.add_link(self.netns, link)
|
555
561
|
# add and move link
|
556
562
|
else:
|
557
563
|
bind_netns.ipr.link('add', **(settings))
|
558
|
-
link =
|
559
|
-
ifname=settings['ifname'])), None)
|
564
|
+
link = bind_netns.ipr.get_link(ifname=settings['ifname'])
|
560
565
|
if link is not None:
|
561
566
|
item = self.ifstate.link_registry.add_link(bind_netns, link)
|
562
567
|
item.update_netns(self.netns)
|
@@ -10,6 +10,8 @@ logger.log_add = lambda option, oper='add': logger.info(oper, extra={'option': o
|
|
10
10
|
logger.log_change = lambda option, oper='change': logger.info(oper, extra={'option': option, 'style': IfStateLogging.STYLE_CHG})
|
11
11
|
logger.log_ok = lambda option, oper='ok': logger.info(oper, extra={'option': option, 'style': IfStateLogging.STYLE_OK})
|
12
12
|
logger.log_del = lambda option, oper='del': logger.info(oper, extra={'option': option, 'style': IfStateLogging.STYLE_DEL})
|
13
|
+
logger.log_err = lambda option, oper='warn': logger.error(oper, extra={'option': option})
|
14
|
+
logger.log_warn = lambda option, oper='warn': logger.warning(oper, extra={'option': option})
|
13
15
|
|
14
16
|
formatter = logging.Formatter('%(bol)s%(prefix)s%(style)s%(message)s%(eol)s')
|
15
17
|
|
@@ -206,8 +206,8 @@ class LinkRegistry():
|
|
206
206
|
hex_length = int((15-len(prefix))/2)
|
207
207
|
free = False
|
208
208
|
while True:
|
209
|
-
ifname = prefix + token_hex(hex_length)
|
210
|
-
if self.get_link(
|
209
|
+
ifname = prefix + secrets.token_hex(hex_length)
|
210
|
+
if self.get_link(ifname=ifname) is None:
|
211
211
|
return ifname
|
212
212
|
|
213
213
|
def debug_dump(self):
|
@@ -270,7 +270,7 @@ class LinkRegistryItem():
|
|
270
270
|
idx = next(iter(netns.ipr.link_lookup(ifname=self.attributes['ifname'])), None)
|
271
271
|
if idx is not None:
|
272
272
|
# ToDo
|
273
|
-
self.update_ifname( self.
|
273
|
+
self.update_ifname( self.registry.get_random_name('__netns__') )
|
274
274
|
|
275
275
|
self.__ipr_link('set', index=self.attributes['index'], net_ns_fd=netns_name)
|
276
276
|
self.netns = netns
|
@@ -309,8 +309,17 @@ class Tables(collections.abc.Mapping):
|
|
309
309
|
|
310
310
|
for route in croutes:
|
311
311
|
if 'oif' in route and type(route['oif']) == str:
|
312
|
-
|
312
|
+
oif = next(
|
313
313
|
iter(self.netns.ipr.link_lookup(ifname=route['oif'])), None)
|
314
|
+
if oif is None:
|
315
|
+
if 'gateway' in route:
|
316
|
+
logger.log_warn(log_str, '! {}: dev {} is unknown'.format(route['dst'], route['oif']))
|
317
|
+
del route['oif']
|
318
|
+
else:
|
319
|
+
logger.log_err(log_str, '! {}: dev {} is unknown'.format(route['dst'], route['oif']))
|
320
|
+
continue
|
321
|
+
else:
|
322
|
+
route['oif'] = oif
|
314
323
|
found = False
|
315
324
|
identical = False
|
316
325
|
matched = vrrp_match(route, by_vrrp, vrrp_type, vrrp_name, vrrp_state)
|
@@ -554,7 +563,7 @@ class Rules():
|
|
554
563
|
if ignore:
|
555
564
|
continue
|
556
565
|
|
557
|
-
logger.log_del(
|
566
|
+
logger.log_del('#{}'.format(rule['priority']))
|
558
567
|
try:
|
559
568
|
if do_apply:
|
560
569
|
self.netns.ipr.rule('del', **rule)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import libifstate.exception
|
1
2
|
from libifstate.log import logger, IfStateLogging
|
2
3
|
from pyroute2 import IPRoute, NetNS, netns
|
3
4
|
|
@@ -164,6 +165,19 @@ class IPRouteExt(IPRoute):
|
|
164
165
|
|
165
166
|
return self.nlm_request(msg, RTM_NEWNSID, NLM_F_REQUEST | NLM_F_ACK)
|
166
167
|
|
168
|
+
def get_link(self, *argv, **kwarg):
|
169
|
+
'''
|
170
|
+
Returns the first link info by wrapping a `get_links()` call and return
|
171
|
+
`None` rather than raising any pyroute2 netlink exception on error.
|
172
|
+
'''
|
173
|
+
try:
|
174
|
+
return next(iter(self.get_links(*argv, **kwarg)), None)
|
175
|
+
except Exception as err:
|
176
|
+
if not isinstance(err, netlinkerror_classes):
|
177
|
+
raise
|
178
|
+
|
179
|
+
return None
|
180
|
+
|
167
181
|
class NetNSExt(NetNS):
|
168
182
|
def __init__(self, *args, **kwargs):
|
169
183
|
super().__init__(*args, **kwargs)
|
@@ -275,6 +289,19 @@ class NetNSExt(NetNS):
|
|
275
289
|
|
276
290
|
return self.nlm_request(msg, RTM_NEWNSID, NLM_F_REQUEST | NLM_F_ACK)
|
277
291
|
|
292
|
+
def get_link(self, *argv, **kwarg):
|
293
|
+
'''
|
294
|
+
Returns the first link info by wrapping a `get_links()` call and return
|
295
|
+
`None` rather than raising any pyroute2 netlink exception on error.
|
296
|
+
'''
|
297
|
+
try:
|
298
|
+
return next(iter(self.get_links(*argv, **kwarg)), None)
|
299
|
+
except Exception as err:
|
300
|
+
if not isinstance(err, libifstate.exception.netlinkerror_classes):
|
301
|
+
raise
|
302
|
+
|
303
|
+
return None
|
304
|
+
|
278
305
|
class LinkDependency:
|
279
306
|
def __init__(self, ifname, netns):
|
280
307
|
self.ifname = ifname
|
@@ -5,6 +5,7 @@ from ipaddress import ip_network
|
|
5
5
|
import collections
|
6
6
|
from copy import deepcopy
|
7
7
|
import pyroute2.netns
|
8
|
+
import socket
|
8
9
|
|
9
10
|
class WireGuard():
|
10
11
|
def __init__(self, netns, iface, wireguard):
|
@@ -95,7 +96,7 @@ class WireGuard():
|
|
95
96
|
has_pchanges = True
|
96
97
|
if do_apply:
|
97
98
|
try:
|
98
|
-
self.
|
99
|
+
self.safe_set_peer(peer)
|
99
100
|
except Exception as err:
|
100
101
|
if not isinstance(err, netlinkerror_classes):
|
101
102
|
raise
|
@@ -119,7 +120,7 @@ class WireGuard():
|
|
119
120
|
has_pchanges = True
|
120
121
|
if do_apply:
|
121
122
|
try:
|
122
|
-
self.
|
123
|
+
self.safe_set_peer(peer)
|
123
124
|
except Exception as err:
|
124
125
|
if not isinstance(err, netlinkerror_classes):
|
125
126
|
raise
|
@@ -141,3 +142,12 @@ class WireGuard():
|
|
141
142
|
logger.log_change('wg.peers')
|
142
143
|
else:
|
143
144
|
logger.log_ok('wg.peers')
|
145
|
+
|
146
|
+
def safe_set_peer(self, peer):
|
147
|
+
try:
|
148
|
+
self.wg.set_peer(self.iface, **peer)
|
149
|
+
except (socket.gaierror, ValueError) as err:
|
150
|
+
logger.warning('failed to set wireguard endpoint at {}: {}'.format(self.iface, err))
|
151
|
+
|
152
|
+
del(peer['endpoint'])
|
153
|
+
self.wg.set_peer(self.iface, **peer)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"$id": "https://ifstate.net/schema/ifstate.conf.schema.json",
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
4
4
|
"title": "ifstate.conf",
|
5
|
-
"description": "IfState 1.11.
|
5
|
+
"description": "IfState 1.11.9 Configuration Schema",
|
6
6
|
"type": "object",
|
7
7
|
"required": [
|
8
8
|
"interfaces"
|
@@ -1590,9 +1590,6 @@
|
|
1590
1590
|
"master": {
|
1591
1591
|
"$ref": "#/$defs/iface-link_master"
|
1592
1592
|
},
|
1593
|
-
"master_netns": {
|
1594
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
1595
|
-
},
|
1596
1593
|
"mtu": {
|
1597
1594
|
"$ref": "#/$defs/iface-link_mtu"
|
1598
1595
|
},
|
@@ -1786,7 +1783,8 @@
|
|
1786
1783
|
"items": {
|
1787
1784
|
"type": "object",
|
1788
1785
|
"required": [
|
1789
|
-
"name"
|
1786
|
+
"name",
|
1787
|
+
"link"
|
1790
1788
|
],
|
1791
1789
|
"additionalProperties": false,
|
1792
1790
|
"properties": {
|
@@ -1890,7 +1888,9 @@
|
|
1890
1888
|
"items": {
|
1891
1889
|
"type": "object",
|
1892
1890
|
"additionalProperties": false,
|
1893
|
-
"required": [
|
1891
|
+
"required": [
|
1892
|
+
"lladdr"
|
1893
|
+
],
|
1894
1894
|
"properties": {
|
1895
1895
|
"lladdr": {
|
1896
1896
|
"description": "destination link layer address",
|
@@ -1962,6 +1962,9 @@
|
|
1962
1962
|
"link": {
|
1963
1963
|
"description": "link settings of the interface",
|
1964
1964
|
"type": "object",
|
1965
|
+
"required": [
|
1966
|
+
"kind"
|
1967
|
+
],
|
1965
1968
|
"oneOf": [
|
1966
1969
|
{
|
1967
1970
|
"description": "Intermediate Functional Block device",
|
@@ -1986,9 +1989,6 @@
|
|
1986
1989
|
"master": {
|
1987
1990
|
"$ref": "#/$defs/iface-link_master"
|
1988
1991
|
},
|
1989
|
-
"master_netns": {
|
1990
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
1991
|
-
},
|
1992
1992
|
"mtu": {
|
1993
1993
|
"$ref": "#/$defs/iface-link_mtu"
|
1994
1994
|
},
|
@@ -2025,9 +2025,6 @@
|
|
2025
2025
|
"master": {
|
2026
2026
|
"$ref": "#/$defs/iface-link_master"
|
2027
2027
|
},
|
2028
|
-
"master_netns": {
|
2029
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2030
|
-
},
|
2031
2028
|
"mtu": {
|
2032
2029
|
"$ref": "#/$defs/iface-link_mtu"
|
2033
2030
|
},
|
@@ -2061,9 +2058,6 @@
|
|
2061
2058
|
"master": {
|
2062
2059
|
"$ref": "#/$defs/iface-link_master"
|
2063
2060
|
},
|
2064
|
-
"master_netns": {
|
2065
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2066
|
-
},
|
2067
2061
|
"mtu": {
|
2068
2062
|
"$ref": "#/$defs/iface-link_mtu"
|
2069
2063
|
},
|
@@ -2097,9 +2091,6 @@
|
|
2097
2091
|
"master": {
|
2098
2092
|
"$ref": "#/$defs/iface-link_master"
|
2099
2093
|
},
|
2100
|
-
"master_netns": {
|
2101
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2102
|
-
},
|
2103
2094
|
"mtu": {
|
2104
2095
|
"$ref": "#/$defs/iface-link_mtu"
|
2105
2096
|
},
|
@@ -2133,9 +2124,6 @@
|
|
2133
2124
|
"master": {
|
2134
2125
|
"$ref": "#/$defs/iface-link_master"
|
2135
2126
|
},
|
2136
|
-
"master_netns": {
|
2137
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2138
|
-
},
|
2139
2127
|
"mtu": {
|
2140
2128
|
"$ref": "#/$defs/iface-link_mtu"
|
2141
2129
|
},
|
@@ -2169,9 +2157,6 @@
|
|
2169
2157
|
"master": {
|
2170
2158
|
"$ref": "#/$defs/iface-link_master"
|
2171
2159
|
},
|
2172
|
-
"master_netns": {
|
2173
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2174
|
-
},
|
2175
2160
|
"mtu": {
|
2176
2161
|
"$ref": "#/$defs/iface-link_mtu"
|
2177
2162
|
},
|
@@ -2205,9 +2190,6 @@
|
|
2205
2190
|
"master": {
|
2206
2191
|
"$ref": "#/$defs/iface-link_master"
|
2207
2192
|
},
|
2208
|
-
"master_netns": {
|
2209
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2210
|
-
},
|
2211
2193
|
"mtu": {
|
2212
2194
|
"$ref": "#/$defs/iface-link_mtu"
|
2213
2195
|
},
|
@@ -2246,9 +2228,6 @@
|
|
2246
2228
|
"master": {
|
2247
2229
|
"$ref": "#/$defs/iface-link_master"
|
2248
2230
|
},
|
2249
|
-
"master_netns": {
|
2250
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2251
|
-
},
|
2252
2231
|
"mtu": {
|
2253
2232
|
"$ref": "#/$defs/iface-link_mtu"
|
2254
2233
|
},
|
@@ -2358,9 +2337,6 @@
|
|
2358
2337
|
"master": {
|
2359
2338
|
"$ref": "#/$defs/iface-link_master"
|
2360
2339
|
},
|
2361
|
-
"master_netns": {
|
2362
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2363
|
-
},
|
2364
2340
|
"mtu": {
|
2365
2341
|
"$ref": "#/$defs/iface-link_mtu"
|
2366
2342
|
},
|
@@ -2397,9 +2373,6 @@
|
|
2397
2373
|
"master": {
|
2398
2374
|
"$ref": "#/$defs/iface-link_master"
|
2399
2375
|
},
|
2400
|
-
"master_netns": {
|
2401
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2402
|
-
},
|
2403
2376
|
"mtu": {
|
2404
2377
|
"$ref": "#/$defs/iface-link_mtu"
|
2405
2378
|
},
|
@@ -2436,9 +2409,6 @@
|
|
2436
2409
|
"master": {
|
2437
2410
|
"$ref": "#/$defs/iface-link_master"
|
2438
2411
|
},
|
2439
|
-
"master_netns": {
|
2440
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2441
|
-
},
|
2442
2412
|
"mtu": {
|
2443
2413
|
"$ref": "#/$defs/iface-link_mtu"
|
2444
2414
|
},
|
@@ -2473,9 +2443,6 @@
|
|
2473
2443
|
"master": {
|
2474
2444
|
"$ref": "#/$defs/iface-link_master"
|
2475
2445
|
},
|
2476
|
-
"master_netns": {
|
2477
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2478
|
-
},
|
2479
2446
|
"mtu": {
|
2480
2447
|
"$ref": "#/$defs/iface-link_mtu"
|
2481
2448
|
},
|
@@ -2703,9 +2670,6 @@
|
|
2703
2670
|
"master": {
|
2704
2671
|
"$ref": "#/$defs/iface-link_master"
|
2705
2672
|
},
|
2706
|
-
"master_netns": {
|
2707
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2708
|
-
},
|
2709
2673
|
"mtu": {
|
2710
2674
|
"$ref": "#/$defs/iface-link_mtu"
|
2711
2675
|
},
|
@@ -2768,9 +2732,6 @@
|
|
2768
2732
|
"master": {
|
2769
2733
|
"$ref": "#/$defs/iface-link_master"
|
2770
2734
|
},
|
2771
|
-
"master_netns": {
|
2772
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2773
|
-
},
|
2774
2735
|
"mtu": {
|
2775
2736
|
"$ref": "#/$defs/iface-link_mtu"
|
2776
2737
|
},
|
@@ -2808,9 +2769,6 @@
|
|
2808
2769
|
"master": {
|
2809
2770
|
"$ref": "#/$defs/iface-link_master"
|
2810
2771
|
},
|
2811
|
-
"master_netns": {
|
2812
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2813
|
-
},
|
2814
2772
|
"mtu": {
|
2815
2773
|
"$ref": "#/$defs/iface-link_mtu"
|
2816
2774
|
},
|
@@ -2853,16 +2811,13 @@
|
|
2853
2811
|
"null"
|
2854
2812
|
],
|
2855
2813
|
"description": "specifies the peer's netns name or null if the peer isn't in a netns namespace"
|
2856
|
-
|
2814
|
+
},
|
2857
2815
|
"state": {
|
2858
2816
|
"$ref": "#/$defs/iface-link_state"
|
2859
2817
|
},
|
2860
2818
|
"master": {
|
2861
2819
|
"$ref": "#/$defs/iface-link_master"
|
2862
2820
|
},
|
2863
|
-
"master_netns": {
|
2864
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2865
|
-
},
|
2866
2821
|
"mtu": {
|
2867
2822
|
"$ref": "#/$defs/iface-link_mtu"
|
2868
2823
|
},
|
@@ -2899,9 +2854,6 @@
|
|
2899
2854
|
"master": {
|
2900
2855
|
"$ref": "#/$defs/iface-link_master"
|
2901
2856
|
},
|
2902
|
-
"master_netns": {
|
2903
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2904
|
-
},
|
2905
2857
|
"mtu": {
|
2906
2858
|
"$ref": "#/$defs/iface-link_mtu"
|
2907
2859
|
},
|
@@ -2964,9 +2916,6 @@
|
|
2964
2916
|
"master": {
|
2965
2917
|
"$ref": "#/$defs/iface-link_master"
|
2966
2918
|
},
|
2967
|
-
"master_netns": {
|
2968
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
2969
|
-
},
|
2970
2919
|
"mtu": {
|
2971
2920
|
"$ref": "#/$defs/iface-link_mtu"
|
2972
2921
|
},
|
@@ -2977,17 +2926,154 @@
|
|
2977
2926
|
"$ref": "#/$defs/iface-link_ifalias"
|
2978
2927
|
},
|
2979
2928
|
"vxlan_id": {
|
2980
|
-
"type":
|
2981
|
-
"integer"
|
2982
|
-
],
|
2929
|
+
"type": "integer",
|
2983
2930
|
"minimum": 0,
|
2984
2931
|
"maximum": 16777215,
|
2985
2932
|
"description": "specifies the VNI"
|
2986
2933
|
},
|
2934
|
+
"vxlan_ageing": {
|
2935
|
+
"type": "integer",
|
2936
|
+
"minimum": 0,
|
2937
|
+
"maximum": 4294967296,
|
2938
|
+
"description": "specifies the lifetime in seconds of FDB entries learnt by the kernel (0: none)",
|
2939
|
+
"default": 300
|
2940
|
+
},
|
2941
|
+
"vxlan_df": {
|
2942
|
+
"enum": [
|
2943
|
+
0,
|
2944
|
+
"unset",
|
2945
|
+
1,
|
2946
|
+
"set",
|
2947
|
+
2,
|
2948
|
+
"inherit"
|
2949
|
+
],
|
2950
|
+
"default": "unset",
|
2951
|
+
"description": "specifies the usage of the DF bit in outgoing packets with IPv4 headers"
|
2952
|
+
},
|
2953
|
+
"vxlan_label": {
|
2954
|
+
"type": "integer",
|
2955
|
+
"minimum": 0,
|
2956
|
+
"maximum": 1048575,
|
2957
|
+
"description": "specifies a fixed flowlabel"
|
2958
|
+
},
|
2959
|
+
"vxlan_learning": {
|
2960
|
+
"type": "integer",
|
2961
|
+
"minimum": 0,
|
2962
|
+
"maximum": 1,
|
2963
|
+
"description": "specifies if unknown source link layer addresses and IP addresses are entered into the VXLAN device fdb",
|
2964
|
+
"default": 1
|
2965
|
+
},
|
2966
|
+
"vxlan_limit": {
|
2967
|
+
"type": "integer",
|
2968
|
+
"minimum": 0,
|
2969
|
+
"maximum": 4294967296,
|
2970
|
+
"description": "specifies the maximum number of FDB entries (0: none)",
|
2971
|
+
"default": 0
|
2972
|
+
},
|
2973
|
+
"vxlan_proxy": {
|
2974
|
+
"type": "integer",
|
2975
|
+
"minimum": 0,
|
2976
|
+
"maximum": 1,
|
2977
|
+
"description": "specifies if ARP proxy is turned on",
|
2978
|
+
"default": 0
|
2979
|
+
},
|
2980
|
+
"vxlan_rsc": {
|
2981
|
+
"type": "integer",
|
2982
|
+
"minimum": 0,
|
2983
|
+
"maximum": 1,
|
2984
|
+
"description": "specifies if route short circuit is turned on",
|
2985
|
+
"default": 0
|
2986
|
+
},
|
2987
|
+
"vxlan_l2miss": {
|
2988
|
+
"type": "integer",
|
2989
|
+
"minimum": 0,
|
2990
|
+
"maximum": 1,
|
2991
|
+
"description": "specifies if netlink LLADDR miss notifications are generated",
|
2992
|
+
"default": 0
|
2993
|
+
},
|
2994
|
+
"vxlan_l3miss": {
|
2995
|
+
"type": "integer",
|
2996
|
+
"minimum": 0,
|
2997
|
+
"maximum": 1,
|
2998
|
+
"description": "specifies if netlink IP ADDR miss notifications are generated",
|
2999
|
+
"default": 0
|
3000
|
+
},
|
3001
|
+
"vxlan_udp_csum": {
|
3002
|
+
"type": "integer",
|
3003
|
+
"minimum": 0,
|
3004
|
+
"maximum": 1,
|
3005
|
+
"description": "specifies if UDP checksum is calculated for tx packets over IPv4",
|
3006
|
+
"default": 1
|
3007
|
+
},
|
2987
3008
|
"vxlan_link": {
|
2988
3009
|
"$ref": "#/$defs/iface-link_tun-dev"
|
3010
|
+
},
|
3011
|
+
"vxlan_local": {
|
3012
|
+
"type": "string",
|
3013
|
+
"description": "tunnel source ip address",
|
3014
|
+
"oneOf": [
|
3015
|
+
{
|
3016
|
+
"format": "ipv4"
|
3017
|
+
},
|
3018
|
+
{
|
3019
|
+
"format": "ipv6"
|
3020
|
+
}
|
3021
|
+
]
|
3022
|
+
},
|
3023
|
+
"vxlan_group": {
|
3024
|
+
"type": "string",
|
3025
|
+
"description": "remote unicast destination or multicast group IPv4 address",
|
3026
|
+
"format": "ipv4"
|
3027
|
+
},
|
3028
|
+
"vxlan_group6": {
|
3029
|
+
"type": "string",
|
3030
|
+
"description": "remote unicast destination or multicast group IPv6 address",
|
3031
|
+
"format": "ipv6"
|
3032
|
+
},
|
3033
|
+
"vxlan_tos": {
|
3034
|
+
"type": "integer",
|
3035
|
+
"description": "specifies the TOS value to use in outgoing packets (0: inherit)",
|
3036
|
+
"minimum": 0,
|
3037
|
+
"maximum": 255,
|
3038
|
+
"default": 0
|
3039
|
+
},
|
3040
|
+
"vxlan_ttl": {
|
3041
|
+
"type": "integer",
|
3042
|
+
"description": "specifies the TTL value to use in outgoing packets (0: auto)",
|
3043
|
+
"minimum": 0,
|
3044
|
+
"maximum": 255,
|
3045
|
+
"default": 0
|
3046
|
+
},
|
3047
|
+
"vxlan_ttl_inherit": {
|
3048
|
+
"type": "boolean",
|
3049
|
+
"description": "control whether TTL is propagated",
|
3050
|
+
"default": false
|
2989
3051
|
}
|
2990
|
-
}
|
3052
|
+
},
|
3053
|
+
"anyOf": [
|
3054
|
+
{
|
3055
|
+
"oneOf": [
|
3056
|
+
{
|
3057
|
+
"required": [
|
3058
|
+
"vxlan_group"
|
3059
|
+
]
|
3060
|
+
},
|
3061
|
+
{
|
3062
|
+
"required": [
|
3063
|
+
"vxlan_group6"
|
3064
|
+
]
|
3065
|
+
}
|
3066
|
+
]
|
3067
|
+
},
|
3068
|
+
{
|
3069
|
+
"not": {
|
3070
|
+
"required": [
|
3071
|
+
"vxlan_group",
|
3072
|
+
"vxlan_group6"
|
3073
|
+
]
|
3074
|
+
}
|
3075
|
+
}
|
3076
|
+
]
|
2991
3077
|
},
|
2992
3078
|
{
|
2993
3079
|
"description": "IPIP interface",
|
@@ -3017,9 +3103,6 @@
|
|
3017
3103
|
"master": {
|
3018
3104
|
"$ref": "#/$defs/iface-link_master"
|
3019
3105
|
},
|
3020
|
-
"master_netns": {
|
3021
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3022
|
-
},
|
3023
3106
|
"mtu": {
|
3024
3107
|
"$ref": "#/$defs/iface-link_mtu"
|
3025
3108
|
},
|
@@ -3062,9 +3145,6 @@
|
|
3062
3145
|
"master": {
|
3063
3146
|
"$ref": "#/$defs/iface-link_master"
|
3064
3147
|
},
|
3065
|
-
"master_netns": {
|
3066
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3067
|
-
},
|
3068
3148
|
"mtu": {
|
3069
3149
|
"$ref": "#/$defs/iface-link_mtu"
|
3070
3150
|
},
|
@@ -3114,9 +3194,6 @@
|
|
3114
3194
|
"master": {
|
3115
3195
|
"$ref": "#/$defs/iface-link_master"
|
3116
3196
|
},
|
3117
|
-
"master_netns": {
|
3118
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3119
|
-
},
|
3120
3197
|
"mtu": {
|
3121
3198
|
"$ref": "#/$defs/iface-link_mtu"
|
3122
3199
|
},
|
@@ -3169,9 +3246,6 @@
|
|
3169
3246
|
"master": {
|
3170
3247
|
"$ref": "#/$defs/iface-link_master"
|
3171
3248
|
},
|
3172
|
-
"master_netns": {
|
3173
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3174
|
-
},
|
3175
3249
|
"mtu": {
|
3176
3250
|
"$ref": "#/$defs/iface-link_mtu"
|
3177
3251
|
},
|
@@ -3220,9 +3294,6 @@
|
|
3220
3294
|
"master": {
|
3221
3295
|
"$ref": "#/$defs/iface-link_master"
|
3222
3296
|
},
|
3223
|
-
"master_netns": {
|
3224
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3225
|
-
},
|
3226
3297
|
"mtu": {
|
3227
3298
|
"$ref": "#/$defs/iface-link_mtu"
|
3228
3299
|
},
|
@@ -3273,9 +3344,6 @@
|
|
3273
3344
|
"master": {
|
3274
3345
|
"$ref": "#/$defs/iface-link_master"
|
3275
3346
|
},
|
3276
|
-
"master_netns": {
|
3277
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3278
|
-
},
|
3279
3347
|
"mtu": {
|
3280
3348
|
"$ref": "#/$defs/iface-link_mtu"
|
3281
3349
|
},
|
@@ -3324,9 +3392,6 @@
|
|
3324
3392
|
"master": {
|
3325
3393
|
"$ref": "#/$defs/iface-link_master"
|
3326
3394
|
},
|
3327
|
-
"master_netns": {
|
3328
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3329
|
-
},
|
3330
3395
|
"mtu": {
|
3331
3396
|
"$ref": "#/$defs/iface-link_mtu"
|
3332
3397
|
},
|
@@ -3365,9 +3430,6 @@
|
|
3365
3430
|
"master": {
|
3366
3431
|
"$ref": "#/$defs/iface-link_master"
|
3367
3432
|
},
|
3368
|
-
"master_netns": {
|
3369
|
-
"$ref": "#/$defs/iface-link_master-netns"
|
3370
|
-
},
|
3371
3433
|
"mtu": {
|
3372
3434
|
"$ref": "#/$defs/iface-link_mtu"
|
3373
3435
|
},
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|