]> git.proxmox.com Git - ifupdown2.git/commitdiff
add patch to add arp-accept option
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 3 Sep 2019 08:07:16 +0000 (10:07 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 4 Sep 2019 14:43:04 +0000 (16:43 +0200)
needed for bgp-evpn

upstream pull request:
https://github.com/CumulusNetworks/ifupdown2/pull/121

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
debian/patches/pve/0009-add-arp-accept-option.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/pve/0009-add-arp-accept-option.patch b/debian/patches/pve/0009-add-arp-accept-option.patch
new file mode 100644 (file)
index 0000000..dd27ffb
--- /dev/null
@@ -0,0 +1,55 @@
+From 45db39f606e09486889128b93f1942639620d2aa Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier@odiso.com>
+Date: Tue, 3 Sep 2019 09:43:38 +0200
+Subject: [PATCH] add arp-accept option.
+
+Currently, the only way to enable arp-accept is to enable
+a policy with l3_intf_arp_accept.
+
+But this enable arp-accept for all bridges.
+
+This option allow to define it for specific bridge.
+
+This is needed with bgp-evpn and vm migration
+https://github.com/FRRouting/frr/issues/4904
+---
+ ifupdown2/addons/address.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/ifupdown2/addons/address.py b/ifupdown2/addons/address.py
+index f576dc0..762c58c 100644
+--- a/ifupdown2/addons/address.py
++++ b/ifupdown2/addons/address.py
+@@ -96,6 +96,11 @@ class address(moduleBase):
+                               'dual connected VxLANs',
+                               'validvals' : ['<ipv4>', ],
+                               'example'  : ['clagd-vxlan-anycast-ip 36.0.0.11']},
++                      'arp-accept' :
++                            { 'help': 'Allow gratuitous arp to update arp table',
++                              'validvals': ['on', 'off', 'yes', 'no', '0', '1'],
++                              'default' : 'off',
++                              'example' : ['arp-accept on']},
+                       'ip-forward' :
+                             { 'help': 'ip forwarding flag',
+                               'validvals': ['on', 'off', 'yes', 'no', '0', '1'],
+@@ -272,6 +277,8 @@ class address(moduleBase):
+     def _process_bridge(self, ifaceobj, up):
+         hwaddress = self._get_hwaddress(ifaceobj)
+         addrs = ifaceobj.get_attr_value_first('address')
++        arp_accept = ifaceobj.get_attr_value_first('arp-accept')
++        arp_accept = utils.boolean_support_binary(arp_accept)
+         is_vlan_dev_on_vlan_aware_bridge = False
+         is_bridge = self.ipcmd.is_bridge(ifaceobj.name)
+         if not is_bridge:
+@@ -290,7 +297,7 @@ class address(moduleBase):
+                         self.write_file('/proc/sys/net/ipv4/conf/%s' % ifaceobj.name +
+                                         '/arp_accept', '0')
+                 else:
+-                    self.write_file('/proc/sys/net/ipv4/conf/%s/arp_accept' % ifaceobj.name, '0')
++                    self.write_file('/proc/sys/net/ipv4/conf/%s/arp_accept' % ifaceobj.name, arp_accept)
+         if hwaddress and is_vlan_dev_on_vlan_aware_bridge:
+            if up:
+               self.ipcmd.bridge_fdb_add(bridgename, hwaddress, vlan)
+-- 
+2.20.1
+
index feea3bc086a05d81cf0f2afc1a7cba4c4f3a4469..a66998f64fb49de3aac396dfb185abf9e9517ac3 100644 (file)
@@ -6,3 +6,4 @@ pve/0005-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch
 pve/0006-add-uplink-id-option.patch
 pve/0007-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
 pve/0008-config-tuning.patch
+pve/0009-add-arp-accept-option.patch