From 6b9c5906e2636f3078806639ce5713194ca03c21 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 3 Jul 2018 10:56:28 +0200 Subject: [PATCH] update to current master-next and remove upstreamed patches Signed-off-by: Wolfgang Bumiller --- ...ripts-fix-ENV-for-interfaces-options.patch | 29 ---- .../0002-add-vxlan-physdev-support.patch | 159 ------------------ ...link-IFLA_BRPORT_ARP_SUPPRESS-use-32.patch | 30 ---- ...veth-fwpr-interfaces-from-bridge-on.patch} | 4 +- .../0002-manual-interfaces-set-link-up.patch | 58 ------- ...dd-dummy-mtu-bridgevlanport-modules.patch} | 4 +- ...5-allow-address-on-vlan-aware-bridge.patch | 33 ---- debian/patches/series | 9 +- ifupdown2 | 2 +- 9 files changed, 7 insertions(+), 321 deletions(-) delete mode 100644 debian/patches/extra/0001-addons-scripts-fix-ENV-for-interfaces-options.patch delete mode 100644 debian/patches/extra/0002-add-vxlan-physdev-support.patch delete mode 100644 debian/patches/extra/0003-netlink-IFLA_BRPORT_ARP_SUPPRESS-use-32.patch rename debian/patches/pve/{0003-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch => 0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch} (93%) delete mode 100644 debian/patches/pve/0002-manual-interfaces-set-link-up.patch rename debian/patches/pve/{0004-add-dummy-mtu-bridgevlanport-modules.patch => 0003-add-dummy-mtu-bridgevlanport-modules.patch} (97%) delete mode 100644 debian/patches/pve/0005-allow-address-on-vlan-aware-bridge.patch diff --git a/debian/patches/extra/0001-addons-scripts-fix-ENV-for-interfaces-options.patch b/debian/patches/extra/0001-addons-scripts-fix-ENV-for-interfaces-options.patch deleted file mode 100644 index 5c9e40a..0000000 --- a/debian/patches/extra/0001-addons-scripts-fix-ENV-for-interfaces-options.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Mon, 14 May 2018 16:27:22 +0200 -Subject: [PATCH] addons scripts : fix ENV for interfaces options - -This is a bug currently, where env vars with interfaces options -were not reset between interfaces - -https://github.com/CumulusNetworks/ifupdown2/issues/49 ---- - ifupdown2/ifupdown/ifupdownmain.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py -index 2daf49f..4931f73 100644 ---- a/ifupdown2/ifupdown/ifupdownmain.py -+++ b/ifupdown2/ifupdown/ifupdownmain.py -@@ -1552,7 +1552,7 @@ class ifupdownMain(ifupdownBase): - cenv = None - iface_env = ifaceobj.get_env() - if iface_env: -- cenv = os.environ -+ cenv = dict(os.environ) - if cenv: - cenv.update(iface_env) - else: --- -2.11.0 - diff --git a/debian/patches/extra/0002-add-vxlan-physdev-support.patch b/debian/patches/extra/0002-add-vxlan-physdev-support.patch deleted file mode 100644 index df5c3c1..0000000 --- a/debian/patches/extra/0002-add-vxlan-physdev-support.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Wed, 16 May 2018 09:58:45 +0200 -Subject: [PATCH] add vxlan-physdev support - -backported from master branch -https://github.com/CumulusNetworks/ifupdown2/pull/19 ---- - ifupdown2/addons/vxlan.py | 19 ++++++++++++++++++- - ifupdown2/ifupdown/netlink.py | 8 ++++++-- - ifupdown2/ifupdownaddons/LinkUtils.py | 5 ++++- - ifupdown2/nlmanager/nlmanager.py | 4 +++- - 4 files changed, 31 insertions(+), 5 deletions(-) - -diff --git a/ifupdown2/addons/vxlan.py b/ifupdown2/addons/vxlan.py -index 3148e44..2aedbfc 100644 ---- a/ifupdown2/addons/vxlan.py -+++ b/ifupdown2/addons/vxlan.py -@@ -54,6 +54,9 @@ class vxlan(moduleBase): - 'validvals' : [''], - 'example': ['vxlan-remoteip 172.16.22.127'], - 'multiline': True}, -+ 'vxlan-physdev' : -+ {'help' : 'vxlan physical device', -+ 'example': ['vxlan-physdev eth1']}, - 'vxlan-learning' : - {'help' : 'vxlan learning yes/no', - 'validvals' : ['yes', 'no', 'on', 'off'], -@@ -123,6 +126,13 @@ class vxlan(moduleBase): - vxlan._clagd_vxlan_anycast_ip = clagd_vxlan_list[0] - - self._set_global_local_ip(ifaceobj) -+ -+ # If we should use a specific underlay device for the VXLAN -+ # tunnel make sure this device is set up before the VXLAN iface. -+ physdev = ifaceobj.get_attr_value_first('vxlan-physdev') -+ if physdev: -+ return [ physdev ] -+ - return None - - def _set_global_local_ip(self, ifaceobj): -@@ -184,6 +194,7 @@ class vxlan(moduleBase): - self.syntax_check_localip_anycastip_equal(ifname, local, anycastip) - # if both local-ip and anycast-ip are identical the function prints a warning - -+ physdev = ifaceobj.get_attr_value_first('vxlan-physdev') - ageing = ifaceobj.get_attr_value_first('vxlan-ageing') - vxlan_port = ifaceobj.get_attr_value_first('vxlan-port') - purge_remotes = self._get_purge_remotes(ifaceobj) -@@ -291,7 +302,8 @@ class vxlan(moduleBase): - learning=learning, - ageing=ageing, - group=group, -- dstport=vxlan_port) -+ dstport=vxlan_port, -+ physdev=physdev) - except Exception as e_netlink: - self.logger.debug('%s: vxlan netlink: %s' % (ifname, str(e_netlink))) - try: -@@ -463,6 +475,11 @@ class vxlan(moduleBase): - self._query_check_n_update(ifaceobj, ifaceobjcurr, 'vxlan-ageing', - ageing, vxlanattrs.get('ageing')) - -+ physdev = ifaceobj.get_attr_value_first('vxlan-physdev') -+ if physdev: -+ self._query_check_n_update(ifaceobj, ifaceobjcurr, 'vxlan-physdev', -+ physdev, vxlanattrs.get('physdev')) -+ - def _query_running(self, ifaceobjrunning): - vxlanattrs = self.ipcmd.get_vxlandev_attrs(ifaceobjrunning.name) - if not vxlanattrs: -diff --git a/ifupdown2/ifupdown/netlink.py b/ifupdown2/ifupdown/netlink.py -index 6a29902..2e6fc55 100644 ---- a/ifupdown2/ifupdown/netlink.py -+++ b/ifupdown2/ifupdown/netlink.py -@@ -263,7 +263,7 @@ class Netlink(utilsBase): - % (ifacename, vlanid, str(e))) - - def link_add_vxlan(self, ifacename, vxlanid, local=None, dstport=VXLAN_UDP_PORT, -- group=None, learning=True, ageing=None): -+ group=None, learning=True, ageing=None, physdev=None): - cmd = 'ip link add %s type vxlan id %s dstport %s' % (ifacename, - vxlanid, - dstport) -@@ -271,16 +271,20 @@ class Netlink(utilsBase): - cmd += ' ageing %s' % ageing if ageing else '' - cmd += ' remote %s' % group if group else ' noremote' - cmd += ' nolearning' if not learning else '' -+ cmd += ' dev %s' % physdev if physdev else '' - self.logger.info('%s: netlink: %s' % (ifacename, cmd)) - if ifupdownflags.flags.DRYRUN: return - try: -+ if physdev: -+ physdev = self.get_iface_index (physdev) - return self._nlmanager_api.link_add_vxlan(ifacename, - vxlanid, - dstport=dstport, - local=local, - group=group, - learning=learning, -- ageing=ageing) -+ ageing=ageing, -+ physdev=physdev) - except Exception as e: - raise Exception('netlink: %s: cannot create vxlan %s: %s' - % (ifacename, vxlanid, str(e))) -diff --git a/ifupdown2/ifupdownaddons/LinkUtils.py b/ifupdown2/ifupdownaddons/LinkUtils.py -index ab93f77..81c0b57 100644 ---- a/ifupdown2/ifupdownaddons/LinkUtils.py -+++ b/ifupdown2/ifupdownaddons/LinkUtils.py -@@ -515,18 +515,21 @@ class LinkUtils(utilsBase): - linkattrs['kind'] = 'vxlan' - vattrs = {'vxlanid': citems[i + 2], - 'svcnode': None, -+ 'physdev': None, - 'remote': [], - 'ageing': citems[i + 2], - 'learning': 'on'} - for j in range(i + 2, len(citems)): - if citems[j] == 'local': - vattrs['local'] = citems[j + 1] -- elif citems[j] == 'remote': -+ elif citems[j] == 'group': - vattrs['svcnode'] = citems[j + 1] - elif citems[j] == 'ageing': - vattrs['ageing'] = citems[j + 1] - elif citems[j] == 'nolearning': - vattrs['learning'] = 'off' -+ elif citems[j] == 'dev': -+ vattrs['physdev'] = citems[j + 1] - linkattrs['linkinfo'] = vattrs - break - elif citems[i] == 'vrf' and citems[i + 1] == 'table': -diff --git a/ifupdown2/nlmanager/nlmanager.py b/ifupdown2/nlmanager/nlmanager.py -index e4a5892..14f7066 100644 ---- a/ifupdown2/nlmanager/nlmanager.py -+++ b/ifupdown2/nlmanager/nlmanager.py -@@ -969,7 +969,7 @@ class NetlinkManager(object): - return self.tx_nlpacket_get_response(nbr) - - def link_add_vxlan(self, ifname, vxlanid, dstport=None, local=None, -- group=None, learning=True, ageing=None): -+ group=None, learning=True, ageing=None, physdev=None): - - debug = RTM_NEWLINK in self.debug - -@@ -980,6 +980,8 @@ class NetlinkManager(object): - info_data[Link.IFLA_VXLAN_LOCAL] = local - if group: - info_data[Link.IFLA_VXLAN_GROUP] = group -+ if physdev: -+ info_data[Link.IFLA_VXLAN_LINK] = int (physdev) - - info_data[Link.IFLA_VXLAN_LEARNING] = int(learning) - --- -2.11.0 - diff --git a/debian/patches/extra/0003-netlink-IFLA_BRPORT_ARP_SUPPRESS-use-32.patch b/debian/patches/extra/0003-netlink-IFLA_BRPORT_ARP_SUPPRESS-use-32.patch deleted file mode 100644 index 13dfbc6..0000000 --- a/debian/patches/extra/0003-netlink-IFLA_BRPORT_ARP_SUPPRESS-use-32.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Wed, 16 May 2018 02:16:42 +0200 -Subject: [PATCH] netlink : IFLA_BRPORT_ARP_SUPPRESS : use 32 - -this has been upstreamed recently in linux kernel, with IFLA_BRPORT_NEIGH_SUPPRESS. -cumulus was using a temp 152 number. -It's need for vxlan + anycast gateway ---- - ifupdown2/nlmanager/nlpacket.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ifupdown2/nlmanager/nlpacket.py b/ifupdown2/nlmanager/nlpacket.py -index d6f93fe..28c43c2 100644 ---- a/ifupdown2/nlmanager/nlpacket.py -+++ b/ifupdown2/nlmanager/nlpacket.py -@@ -3306,9 +3306,9 @@ class Link(NetlinkPacket): - IFLA_BRPORT_VLAN_TUNNEL = 29 - IFLA_BRPORT_BCAST_FLOOD = 30 - IFLA_BRPORT_GROUP_FWD_MASK = 31 -+ IFLA_BRPORT_ARP_SUPPRESS = 32 - IFLA_BRPORT_PEER_LINK = 150 - IFLA_BRPORT_DUAL_LINK = 151 -- IFLA_BRPORT_ARP_SUPPRESS = 152 - IFLA_BRPORT_GROUP_FWD_MASKHI = 153 - IFLA_BRPORT_DOWN_PEERLINK_REDIRECT = 154 - --- -2.11.0 - diff --git a/debian/patches/pve/0003-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch b/debian/patches/pve/0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch similarity index 93% rename from debian/patches/pve/0003-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch rename to debian/patches/pve/0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch index df1a0b2..d11f158 100644 --- a/debian/patches/pve/0003-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch +++ b/debian/patches/pve/0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch @@ -10,10 +10,10 @@ as proxmox don't defined them in /etc/network/interfaces 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py -index 02cbebf..9140735 100644 +index 1b4dcdd..3f97898 100644 --- a/ifupdown2/addons/bridge.py +++ b/ifupdown2/addons/bridge.py -@@ -954,7 +954,7 @@ class bridge(moduleBase): +@@ -958,7 +958,7 @@ class bridge(moduleBase): runningbridgeports = self.brctlcmd.get_bridge_ports(ifaceobj.name) if runningbridgeports: for bport in runningbridgeports: diff --git a/debian/patches/pve/0002-manual-interfaces-set-link-up.patch b/debian/patches/pve/0002-manual-interfaces-set-link-up.patch deleted file mode 100644 index e3e7423..0000000 --- a/debian/patches/pve/0002-manual-interfaces-set-link-up.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Mon, 14 May 2018 17:06:52 +0200 -Subject: [PATCH] manual interfaces : set link up - -by default ifdown2 don't set link up for manual interfaces. - -classic ifupdown set link up for manual interfaces. -I think this has change with jessie and systemd. - -https://github.com/CumulusNetworks/ifupdown2/issues/4 ---- - ifupdown2/ifupdown/ifupdownmain.py | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) - -diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py -index 45391ee..2daf49f 100644 ---- a/ifupdown2/ifupdown/ifupdownmain.py -+++ b/ifupdown2/ifupdown/ifupdownmain.py -@@ -97,11 +97,6 @@ class ifupdownMain(ifupdownBase): - (ifaceobj.link_privflags & ifaceLinkPrivFlags.VRF_SLAVE)): - self._keep_link_down(ifaceobj) - return -- # if not a logical interface and addr method is manual, -- # ignore link admin state changes -- if (ifaceobj.addr_method == 'manual' and -- not ifaceobj.link_kind): -- return - if self._delay_admin_state: - self._delay_admin_state_iface_queue.append(ifaceobj.name) - return -@@ -134,11 +129,6 @@ class ifupdownMain(ifupdownBase): - # there is no real interface behind it - if ifaceobj.type == ifaceType.BRIDGE_VLAN: - return -- # if not a logical interface and addr method is manual, -- # ignore link admin state changes -- if (ifaceobj.addr_method == 'manual' and -- not ifaceobj.link_kind): -- return - if self._delay_admin_state: - self._delay_admin_state_iface_queue.append(ifaceobj.name) - return -@@ -527,10 +517,7 @@ class ifupdownMain(ifupdownBase): - def _set_iface_role_n_kind(self, ifaceobj, upperifaceobj): - - # If addr_method is set and link is not a logical interface, -- # set flag KEEP_LINK_DOWN. addr_method == 'manual' only applies to -- # logical interfaces. -- if (ifaceobj.addr_method == 'manual' and not ifaceobj.link_kind): -- ifaceobj.link_privflags |= ifaceLinkPrivFlags.KEEP_LINK_DOWN -+ # set flag KEEP_LINK_DOWN. - - if (upperifaceobj.link_kind & ifaceLinkKind.BOND): - self._set_iface_role(ifaceobj, ifaceRole.SLAVE, upperifaceobj) --- -2.11.0 - diff --git a/debian/patches/pve/0004-add-dummy-mtu-bridgevlanport-modules.patch b/debian/patches/pve/0003-add-dummy-mtu-bridgevlanport-modules.patch similarity index 97% rename from debian/patches/pve/0004-add-dummy-mtu-bridgevlanport-modules.patch rename to debian/patches/pve/0003-add-dummy-mtu-bridgevlanport-modules.patch index cb43ab9..2796aeb 100644 --- a/debian/patches/pve/0004-add-dummy-mtu-bridgevlanport-modules.patch +++ b/debian/patches/pve/0003-add-dummy-mtu-bridgevlanport-modules.patch @@ -17,10 +17,10 @@ we can override them with ifupdown2 addon scripts, doing nothing. create mode 100644 ifupdown2/addons/mtu.py diff --git a/etc/network/ifupdown2/addons.conf b/etc/network/ifupdown2/addons.conf -index c0d1ce9..16b57ec 100644 +index 4afbedf..2245cce 100644 --- a/etc/network/ifupdown2/addons.conf +++ b/etc/network/ifupdown2/addons.conf -@@ -13,6 +13,8 @@ up,dhcp +@@ -15,6 +15,8 @@ up,dhcp up,address up,addressvirtual up,usercmds diff --git a/debian/patches/pve/0005-allow-address-on-vlan-aware-bridge.patch b/debian/patches/pve/0005-allow-address-on-vlan-aware-bridge.patch deleted file mode 100644 index 26edd11..0000000 --- a/debian/patches/pve/0005-allow-address-on-vlan-aware-bridge.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alexandre Derumier -Date: Sat, 16 Jun 2018 14:59:46 +0200 -Subject: [PATCH] allow address on vlan aware bridge - -This will allow to setup ip address on vlan aware bridge. -Note that in this case, the ip will use the default PVID. ---- - ifupdown2/ifupdown/utils.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/ifupdown2/ifupdown/utils.py b/ifupdown2/ifupdown/utils.py -index f7a89a7..cee3425 100644 ---- a/ifupdown2/ifupdown/utils.py -+++ b/ifupdown2/ifupdown/utils.py -@@ -346,14 +346,6 @@ class utils(): - else: - cls.logger.info(msg) - return False -- elif (ifaceobj.link_kind & ifaceLinkKind.BRIDGE -- and ifaceobj.link_privflags & ifaceLinkPrivFlags.BRIDGE_VLAN_AWARE): -- msg = '%s bridge vlan aware interfaces' -- if syntax_check: -- cls.logger.warning(msg) -- else: -- cls.logger.info(msg) -- return False - return True - - @classmethod --- -2.11.0 - diff --git a/debian/patches/series b/debian/patches/series index 42616c4..e331b7b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,8 +1,3 @@ -extra/0001-addons-scripts-fix-ENV-for-interfaces-options.patch -extra/0002-add-vxlan-physdev-support.patch -extra/0003-netlink-IFLA_BRPORT_ARP_SUPPRESS-use-32.patch pve/0001-config-tuning.patch -pve/0002-manual-interfaces-set-link-up.patch -pve/0003-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch -pve/0004-add-dummy-mtu-bridgevlanport-modules.patch -pve/0005-allow-address-on-vlan-aware-bridge.patch +pve/0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch +pve/0003-add-dummy-mtu-bridgevlanport-modules.patch diff --git a/ifupdown2 b/ifupdown2 index ec22e01..fb4bd74 160000 --- a/ifupdown2 +++ b/ifupdown2 @@ -1 +1 @@ -Subproject commit ec22e01b6d43d94497a09ed74da26b32ff13653b +Subproject commit fb4bd746d65fc4895b17c4812f7416aec18ae594 -- 2.39.2