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

132 Commits

Author SHA1 Message Date
15b329c571 python3: addons: bridge: add traceback for debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:23 +01:00
7f208e5670 python3: replace python2 map with loops
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:58:25 +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
8ebee96099 Merge pull request #121 from aderumier/arpaccept
add arp-accept option.
2019-10-24 16:21:29 -07:00
1589716377 addons: address: if hwaddress changed delete old fdb entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:45 +02:00
ff775ef150 addons: bond: enable ipv6 on brports before bond enslaving
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:34 +02:00
97fc046b41 addons: vrf: enable_ipv6: rename method and add sysfs check for brport
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:24 +02:00
40a693172d reverting the iface.py changes ; addons: vrf: enable ipv6 on slaves
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:51:12 +02:00
2e2dcdaf36 addons: address: remove old ip address when intf is moved to dhcp
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:49:21 +02:00
d92f630c59 addons: vrf: enable ipv6 on vrf slaves when moved from bport
Remove/add swp2 from br0 and vrf blue

auto swp2
iface swp2
      vrf blue

auto br0
iface br0
      bridge-ports swp1
      address 10.0.0.11/24
      bridge-vlan-aware no

auto blue
iface blue
      vrf-table auto

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:48:59 +02:00
45db39f606 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
2019-09-03 09:43:38 +02:00
a6f6c8b2ad addons: dhcp: PEP8 fixes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:22:10 +04:00
d0df31ff9d Merge pull request #116 from rajendra-dendukuri/dhcp6_duid
addons: dhcp: Policy to specify DUID type to use on dhcpv6 requests
2019-07-12 12:18:02 +04:00
1321d5e357 addons: dhcp: Policy to specify DUID type to use on dhcpv6 requests
Update module description and changelog

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
2019-07-10 22:43:28 -07:00
f5c97c0d6b Add bridge-ports-condone-regex option (closes #117)
The bridge-ports-condone-regex option can be used to tell ifupdown2 to let
  some bridge member ports alone and do not remove them on ifreload runs.
  This might come in handy when running a KVM (or any other virtualization
  system) host with a bridged network setup.

  Before this option, ifupdown2 would either complain about not existing
  member ports when setting up the bridge (if all VM interfaces were to
  be specified in /etc/network/interfaces) or remove any VM interface
  from a bridge if it was not specified in /e/n/i.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Co-authored-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-09 19:22:52 +04:00
f62cfb7b95 addons: dhcp: Policy to specify DUID type to use on dhcpv6 requests
Add a ifupdown2 policy attribute dhcp6-duid to allow user to specify the DUID type
to be used on an IPv6 enabled interface.

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
2019-07-06 15:14:38 -07:00
ee0075399a addons: addressvirtual: keep macvlan down if link-down specified on lower device
auto vlan1755
iface vlan1755
        address 172.21.7.42/29
	address-virtual 00:00:5E:00:01:41 172.21.7.41/29
	link-down yes
	vlan-id 1755
	vlan-raw-device bridge

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-24 15:39:46 +08:00
d1477c4b9f addons: when comparing mac addresses use integer representation
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-12 23:26:20 +08:00
2be8e23956 Merge pull request #108 from rajendra-dendukuri/ll_wait_option
Policy to wait for IPv6 link local address to be available
2019-06-12 01:01:36 +08:00
0cc54cf374 addons: dhcp: Policy to wait for IPv6 link local address to be available
Rename the policy attribute as dhcp6-ll-wait.
Changed logic to reuse existing timeout variable to store user provided value.
2019-06-11 06:29:43 -04:00
f279a8ef8f Merge pull request #111 from svenauhagen/feature/xfrm
This commit adds support for the new IPSec Interface XFRM.
2019-06-07 00:22:39 +08:00
bff520b123 xfrm id 2019-06-06 17:53:41 +02:00
255ffb1fc3 addons: bridge: set bridge mtu on device creation
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-06 19:18:29 +08:00
19ee2b1139 addons: address: set default mtu on user defined device (via link-type)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-06 19:17:57 +08:00
c02de75ec0 addons: addressvirtual: fix older vrrp macvlan doesn't get removed
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-06 19:17:32 +08:00
61e63e797b addons: protodown vrrp macvlans only when created
Not when we are reloading and applying config ot existing macvlans -
somebody may be using them, we don't want to protodown them in that
case.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-06-06 19:17:12 +08:00
c5e4ed1594 Update xfrm.py
Update copyright text
2019-06-05 13:15:10 +02:00
ca42da726a This release adds support for the new IPSec Interface XFRM.
It is available since Kernel 4.19 and has two parmeters:

1. XFRM ID to map to an SA/SAs
2. Underlying Interface if you want to take advantage of IPSec Hardware Offload

Otherwise it is treated as a normal interface and not like a tunnel (VTI).

I added two attributes to the interface to configure it and otherwise use it as a normal interface.
One example is:

auto ipsec1
iface ipsec1 inet
	xfrm-physdev lo
	xfrmid 1
2019-06-05 11:05:33 +02:00
a252fb200d Policy to wait for IPv6 link local address to be available
Add a ifupdown2 policy attribute to allow user to tune the wait time to be
allowed before the dhclient can be started on an IPv6 enabled interface.
2019-06-01 09:44:04 -04:00
ff1f1df92a addons: batman_adv: Add support to set B.A.T.M.A.N. advanced routing_algo
Add a new attribute for B.A.T.M.A.N. advanced interfaces to control the
  B.A.T.M.A.N. advanced routing algorithm to be used when setting up new
  interfaces. As the routing algorithm must be set before an interface is
  created, it needs special handling and can't be implemented as a common
  attribute. D'oh.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Tested-by: Annika Wickert <aw@awlnx.space>
2019-05-25 14:16:30 +02:00
3c46320a2b Merge pull request #103 from aderumier/fix-ifquery-speed
Fix ifquery speed
2019-05-22 17:55:14 +08:00
52712b1ace readd support for self.ipforward
if user want to setup default forwarding with a global policy
2019-05-15 07:15:00 +02:00
472db7e6a3 addressvirtual: _query_running : use cache instead glob 2019-05-10 09:42:42 +02:00
c20b7810e4 mstpctl: don't load module if missing /sbin/mstpctl 2019-05-10 09:42:42 +02:00
3e074210cf batman_adv: don't load module if missing batctl 2019-05-10 09:42:42 +02:00
42ef1cce92 don't change interface forwarding value if not defined 2019-05-04 15:12:00 +02:00
9b585f9e67 addons: bridge: down: when ifreload_down_changed=1: purge bridge and upper devices cache
On ifreload (down ops) we need to purge the cache entry of the bridge and its upper devices
to avoid stale values in our cache.

ifup this config, then remove bridge-vids 20, ifreload: since the bridge is removed because
of ifreload_down_changed=1, we need torecreate the vlan bridge.10 and it's configuration, the
cache is stale. We need to clear it to remove the ip 10.10.10.10/32.

auto bridge
iface bridge
      bridge-ports swp1 swp2
      bridge-vids 10 20
      bridge-vlan-aware yes

auto swp1
iface swp1
      link-speed 10000

auto swp2
iface swp2

auto bridge.10
iface bridge.10
      address 10.10.10.10/32

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:56:14 +08:00
92c2d4a9e7 addons: addressvirtual: vrrp: protodown new macvlans
New VRRP macvlan devices should be set into protodown when first
created, to prevent ND traffic and other automatically generated kernel
traffic from being transmitted on the interface and causing downstream
MAC moves.

Reviewed-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:55:47 +08:00
1b9d23e8a0 addons: bridge: don't disable ipv6 on vlan-aware vxlan-bridge
ipv6 shouldn't be disabled on a bridge vlan aware

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:55:28 +08:00
3832dce663 addons: bridge: get default mcsnoop value when bridge_vxlan is not set
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:55:09 +08:00
32d448a81c addons: addressvirtual: vrrp: set addrgen mode random on VRRP macvlans
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:53:42 +08:00
9f8f3b0d65 addons: bridge: check kernel state for igmp snooping on vxlan brport
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:53:23 +08:00
b994bd3977 addons: addressvirtual: vrrp: fix multiline-merge attribute detection
Now we support the following config:
auto swp1
iface swp1
      vrrp 3 50.0.1.1/24
      vrrp 3 2001:50:0:1::1/64
      vrrp 3 2001:50:0:42::1/64

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:53:01 +08:00
3e112a1c03 addons: addressvirtual: vrrp: fix macvlan name to include vrrp id
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:52:46 +08:00
bd451a4846 addons: addressvirtual: vrrp: remove macvlan device when all ipvX addrs are removed
For each VRRP configuration we create 2 macvlans (ip4 and ip6), if the ip4
is removed from the config we need to remove the associated macvlan (same
for ip6).

Testing Done: remove all ip4 (or ip6) from vrr attribute line

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:50:42 +08:00
43d3655165 addons: ethtool: raise error on ethtool command failure
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:50:24 +08:00
80adb3c144 addons: bridge: add new policy vxlan_bridge_igmp_snooping_enable_port_mcrouter
if igmp snooping is enabled on a vxlan bridge and if the
vxlan_bridge_igmp_snooping_enable_port_mcrouter is turned on, ifupdown2
will automatically enable multicast router on the vxlan brport unless
this attribute was provided by the user. The policy is enabled by default.

The policy can be disabled as follow:
{
    "bridge": {
	"module_globals": {
	    "vxlan_bridge_igmp_snooping_enable_port_mcrouter": "no"
	}
    }
}

auto br0
iface br0
      bridge-ports vx42
      bridge-mcsnoop yes

auto vx42
iface vx42
      vxlan-id 42

$ ifreload -ad
will show that the config is applied

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:50:00 +08:00
e588acb7d8 addons: addressvirtual: create VRRP macvlans in bridge mode
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:49:44 +08:00