Add support for GRE tunnels

Basic support GRE and GRETAP tunnels both for IPv4 and IPv6.
Limited support right now, only possible to configure local
ip address and remote ip address.
This commit is contained in:
Joachim Wiberg
2025-01-07 15:33:37 +01:00
committed by Mattias Walström
parent 08990556e2
commit c099d887af
23 changed files with 729 additions and 5 deletions
@@ -304,6 +304,8 @@ class Iface:
else:
self.ipv6_addr = []
if self.data.get('infix-interfaces:gre'):
self.gre = self.data['infix-interfaces:gre']
if self.data.get('infix-interfaces:vlan'):
self.lower_if = self.data.get('infix-interfaces:vlan', None).get('lower-layer-if',None)
@@ -323,6 +325,9 @@ class Iface:
def is_veth(self):
return self.data['type'] == "infix-if-type:veth"
def is_gre(self):
return self.data['type'] == "infix-if-type:gre" or self.data['type'] == "infix-if-type:gretap"
def oper(self, detail=False):
"""Remap in brief overview to fit column widths."""
if not detail and self.oper_status == "lower-layer-down":