Commit Graph

1620 Commits

Author SHA1 Message Date
Julien Fortin
2ead3536f2 python3: nlpacket: LINKINFO: workaround: converting strings to bytes and ignoring NoneType
Not sure why there's NoneType objects here...

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:18 +01:00
Julien Fortin
47881fc0bb python3: nlcache: keeping ifname as str (and not bytes) to keep the cache working with minimal disruption
Spoiler alert: it is still super disrupted.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:12 +01:00
Julien Fortin
b47b030330 python3: nlcache: can't compare NoneType with integer using > or < anymore
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:04 +01:00
Julien Fortin
90f5a2d19e python3: nlpacket: BRPORT: decode: convert data to byte before unpacking
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:00 +01:00
Julien Fortin
b38555c4df python3: modulebase: subprocess APIs now return bytes instead of strings
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:51 +01:00
Julien Fortin
502eb02334 python3: scheduler: add traceback.print_exc for debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:45 +01:00
Julien Fortin
15b329c571 python3: addons: bridge: add traceback for debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:23 +01:00
Julien Fortin
6ab519dd59 python3: ch.communicate input should be bytes not str
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:00:16 +01:00
Julien Fortin
c9496c0ae4 python3: nlpacket: fix str vs bytes errors
python2 uses strings but python3 mainly uses bytes, and it's a mess...

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:56 +01:00
Julien Fortin
7f87d9d869 python3: nlcache: cache key (ifname) should of type str not bytes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:39 +01:00
Julien Fortin
54de334242 python3: statemanager: use open call in binary mode
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:25 +01:00
Julien Fortin
97b96fdd22 python3: add traceback.print_exc to help debugging
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:18 +01:00
Julien Fortin
7f208e5670 python3: replace python2 map with loops
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:58:25 +01:00
Julien Fortin
3b01ed7618 python3: 2to3 changes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:55:49 +01:00
Julien Fortin
35681c0608 python3: shebang update
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:40:10 +01:00
Julien Fortin
223ba5af1d ifupdown2 2.0.0-1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 13:46:18 +01:00
Julien Fortin
8ebee96099
Merge pull request #121 from aderumier/arpaccept
add arp-accept option.
2019-10-24 16:21:29 -07:00
Julien Fortin
5e30d3b545 ifupdownmain: detect interfaces no longer configured but pick up by regexes
This patch will detect interfaces that were removed from /etc/network/interfaces
but still got pick up by a regex (i.e. bridge-port vni*) and manually remove
those interfaces from internal data-structures (i.e. dependency graph).

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:53:33 +02:00
Julien Fortin
224f1db80d ifupdown: log: drop comments
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:52:05 +02:00
Julien Fortin
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
Julien Fortin
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
Julien Fortin
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
Julien Fortin
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
Julien Fortin
986965c169 nlmanager: nlmanager: retry binding tx_socket up to NLMANAGER_BIND_RETRY times
NLMANAGER_BIND_RETRY env variable defaults to 4242

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:49:42 +02:00
Julien Fortin
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
Julien Fortin
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
Julien Fortin
f5c47abf3d LinkUtils: convert ip addrs to string before comparing them
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:48:26 +02:00
Julien Fortin
89f5bbe52c ifupdownmain: ifquery check read_iface_config errors
auto swp1
iface swp1
      typo_attribute 42

$ ifquery -ac
error: /etc/network/interfaces: line9: iface swp1: unsupported keyword (typo_attribute)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp                                                [pass]

auto swp1
iface swp1

$ echo $?
1
$
$ echo $?
1
$ ifup -a
error: /etc/network/interfaces: line9: iface swp1: unsupported keyword (typo_attribute)
$ echo $?
1
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-09-18 12:47:29 +02:00
Alexandre Derumier
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
Sven Auhagen
ebd1f30695 This commit adds the feature to change offloads for nics.
Currently GRO, LRO GSO, TSO, UFO, TX and RX Offload are supported.

One can read the current value with ethtool -k NICNAME.
Values are set with ethtool -K NICNAME gro on lro on gso on tso on ufo on tx on rx on

An example for the config file is:

iface eth0 static
	gro-offload no

The default value will be kept in the statemanager. The default value might differ depending on the NIC and is saved upon the first change.
2019-07-30 19:59:34 +02:00
Julien Fortin
5e8a4802f1 setup.py: bumping version from 1.2.5 to 1.2.9
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-24 23:55:19 +02:00
Julien Fortin
5fb588fc9a debian: changelog: add empty 1.2.9-1 entry for next release
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:47:06 +04:00
Julien Fortin
79ba6a415a debian: changelog: add new changelog entry 1.2.8-1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:22:36 +04:00
Julien Fortin
a6f6c8b2ad addons: dhcp: PEP8 fixes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-12 12:22:10 +04:00
Julien Fortin
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
Rajendra Dendukuri
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
Julien Fortin
cf1dac2ff7 debian: changelog: add new 1.2.7-1 entry
* New: Add bridge-ports-condone-regex option (closes #117)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-07-09 19:28:33 +04:00
Maximilian Wilhelm
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
Rajendra Dendukuri
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
Julien Fortin
c9091d7108 debian: changelog: updating 1.2.6-1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-24 15:52:06 +08:00
Julien Fortin
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
Julien Fortin
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
Julien Fortin
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
Rajendra Dendukuri
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
Julien Fortin
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
Sven Auhagen
0c3dbc26cc addons conf 2019-06-06 18:21:37 +02:00
Sven Auhagen
bff520b123 xfrm id 2019-06-06 17:53:41 +02:00
Julien Fortin
8cea3591b5 debian: changelog: update 1.2.6-1 entry
* New. policymanager: merge module policy instead of overriding duplicates
* New: set default mtu on user defined device (via link-type)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-06 19:19:42 +08:00
Julien Fortin
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
Julien Fortin
4b1a6ffdaf policymanager: merge module policy instead of overriding duplicates
When module policies are split up in seperate files ifupdown2 doesn't merge
them together but simply overrides duplicates. This pathc fixes the issue
and merge the related policies together.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-06-06 19:18:11 +08:00