1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

23 Commits

Author SHA1 Message Date
70263054b3 addons: tunnel: support non-disruptive config change
Current design destroys existing tunnel when a config
change is detected. This behaviour causes traffic loss.

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-27 14:54:41 +02:00
d290cfe8e7 addons: tunnel: new attribute: tunnel-tos
'tunnel-tos': {
    'help': 'TOS for tunnel packets (range 0..255), 1=inherit',
    "validrange": ["0", "255"],
    'validvals': ['<number>', 'inherit'],
    'required': False,
    'example': ['tunnel-tos inherit'],
    "aliases": ["tos"]
}

Signed-off-by: Alexander Petrovskiy <alexpe@nvidia.com>
2021-12-01 18:36:44 +03:00
4efd36fab0 addons: tunnel: add 'inherit' value to 'tunnel-ttl' attribute
Signed-off-by: Alexander Petrovskiy <alexpe@nvidia.com>
2021-12-01 17:43:29 +03:00
59ab29fbd1 addons: vxlan: inherit clagd-vxlan-anycast-ip from lo for clag vxlans (introduces old_ifaceobjs to get_dependent_ifacenames)
When clagd anycast ip configuration changes on an existing setup, we have two issues:
- populate_dependency_info is run twice (in the ifreload case), first on the new
ifaceobjs, then on the old ifaceobjs. Thus hitting vxlan.get_dependent_ifacenames twice
where vxlan._clagd_vxlan_anycast_ip is set (the first time properly, then reset to it's
old value).
The fix: add a "old_ifaceobjs" flag to avoid resetting vxlan._clagd_vxlan_anycast_ip

- when clagd anycast ip changes, clagd also updates the vxlan's ip but there's a chance
that the ifupdown2 cache won't get the netlink notification in time before UP ops are
running on the vxlans, running on a stale cache is no bueno.
The fix: add additional checks to see if we should trust the cache of not.

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-06-30 16:29:40 +02:00
3218f49d81 use "except Exception:" instead of "except:"
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-06-24 01:12:24 +02:00
7d6d434f18 addons: tunnel: Update examples to new attr names (#133)
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-02-26 15:08:25 +01:00
79bd5819b9 addons: tunnel: support ifupdown1 tunnel attribute as aliases (fixes #133)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-02-07 18:40:35 +01:00
bd441a519d python3: pypi support: except ImportError and ModuleNotFoundError
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:25:32 +01:00
3b01ed7618 python3: 2to3 changes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:55:49 +01:00
35681c0608 python3: shebang update
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:40:10 +01:00
223ba5af1d ifupdown2 2.0.0-1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 13:46:18 +01:00
6039c4d778 addons: tunnel: fix tunnel creation (#80)- master branch refactoring
During the recent merge between master and master-next the changes introduced
by PR #80 were lost. This commit adds them back with some refactoring to use
the new netlink cache.

Co-authored-by: Maximilian Wilhelm <max@sdn.clinic>
Co-authored-by: Julien Fortin <julien@cumulusnetworks.com>

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-18 17:05:30 +01:00
5a4147c4c1 netlink: add tunnel device support in ipcmd cache
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-18 15:58:11 +01:00
730834002a addons: tunnel: pep8 refactoring
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:42:35 -08:00
84ca91f165 addons: tunnel: Add support for master-next
This commit fixes the tunnel addon for the new master-next branch.
2018-12-13 14:42:35 -08:00
c3c78d9772 addons: tunnel: complete backport by updating imports + PEP8 refactoring
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:42:35 -08:00
8e2f5fbef7 addons: tunnel: dependent device fix 2018-12-13 14:42:35 -08:00
60e7dc3a40 addons: tunnel: get_dependent_ifacenames: tunnel-physdev dependency 2018-12-13 14:42:35 -08:00
f40c629470 addons: tunnel: fix tunnel v4 to v6 change 2018-12-13 14:42:35 -08:00
33ebe60a9d addons: tunnel: add support for vti, ip6gre, ipip6, ip6ip6, vti6 tunnels 2018-12-13 14:42:35 -08:00
b2a87fe8eb addons: tunnel: Add support for GRETAP tunnels. (#34)
This commit adds support to configure and check gretap tunnels. An example
  configuration could look like this:

    iface tap0 inet tunnel
        mode gretap
        local 10.132.255.3
        endpoint 10.132.255.1
        ttl 64
        mtu 1400
        tunnel-physdev eth0
        #
        address 10.10.0.1/2

  ifup will happily configure the interface (which it does even without this
  patch) and ifquery now can successfully validate the configure interface:

    cr03.in.ffho.net:~# ifquery -c tap0
    iface tap0 inet tunnel                   [[ OK ]]
        tunnel-physdev eth0                  [[ OK ]]
        endpoint 10.132.255.1                [[ OK ]]
        local 10.132.255.3                   [[ OK ]]
        mode gretap                          [[ OK ]]
        ttl 64                               [[ OK ]]
        mtu 1400                             [[ OK ]]
        address 10.10.0.1/24                 [[ OK ]]

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2018-12-13 14:42:35 -08:00
ea3bd2b624 Addons/tunnel: fix typo in validvals (#31) 2018-12-13 14:42:35 -08:00
22aa65c782 Add support GRE/SIT tunnels. (#20)
This commit adds support for configuring GRE/IPIP/SIT tunnel interfaces as know
from previous versions of ifupdown. Currently only configuration checks for GRE
and SIT tunnels are implemented.

A tunnel interface configuration could look like this:

auto gre42
iface gre42 inet tunnel
        mode     gre
        local    198.51.100.1
        endpoint 203.0.113.2
	#
	# optional tunnel attributes
        ttl      64
        mtu      1400
	tunnel-physdev eth0
        #
        address  192.0.2.42/31
        address  2001:db8:d0c:23::42/64

auto he-ipv6
iface he-ipv6 inet tunnel
	mode sit
	endpoint 203.0.113.6
	local    198.51.100.66
	#
	# optional tunnel attributes
	ttl 255
	mtu 1466
	tunnel-physdev vrf_external
	#
	address 2001:db8:666::2/64

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-12-13 14:42:35 -08:00