mirror_ifupdown2.git
7 weeks agoMerge pull request #107 from BarbarossaTM/batman-routing-algo-master master
Julien Fortin [Sun, 26 May 2019 03:16:31 +0000 (11:16 +0800)]
Merge pull request #107 from BarbarossaTM/batman-routing-algo-master

addons: batman_adv: Add support to set B.A.T.M.A.N. advanced routing_algo

7 weeks agoaddons: batman_adv: Add support to set B.A.T.M.A.N. advanced routing_algo
Maximilian Wilhelm [Sat, 25 May 2019 12:16:30 +0000 (14:16 +0200)]
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>
8 weeks agoMerge pull request #103 from aderumier/fix-ifquery-speed
Julien Fortin [Wed, 22 May 2019 09:55:14 +0000 (17:55 +0800)]
Merge pull request #103 from aderumier/fix-ifquery-speed

Fix ifquery speed

2 months agoMerge pull request #104 from bauen1/fix-tunnel-vrf
Julien Fortin [Thu, 16 May 2019 06:32:35 +0000 (14:32 +0800)]
Merge pull request #104 from bauen1/fix-tunnel-vrf

ifupdown2addons: fix order of pre-up,vrf and pre-up,tunnel

2 months agoifupdown2addons: fix order of pre-up,vrf and pre-up,tunnel
bauen1 [Wed, 15 May 2019 12:42:29 +0000 (14:42 +0200)]
ifupdown2addons: fix order of pre-up,vrf and pre-up,tunnel

Fixes the vrf addon trying to set the master on a non-existant tunnel
interface

2 months agoMerge pull request #101 from aderumier/fix-forwarding
Julien Fortin [Wed, 15 May 2019 09:43:36 +0000 (17:43 +0800)]
Merge pull request #101 from aderumier/fix-forwarding

don't change interface forwarding value if not defined

2 months agoreadd support for self.ipforward
Alexandre Derumier [Wed, 15 May 2019 05:15:00 +0000 (07:15 +0200)]
readd support for self.ipforward

if user want to setup default forwarding with a global policy

2 months agoaddressvirtual: _query_running : use cache instead glob
Alexandre Derumier [Fri, 10 May 2019 06:19:57 +0000 (08:19 +0200)]
addressvirtual: _query_running : use cache instead glob

2 months agomstpctl: don't load module if missing /sbin/mstpctl
Alexandre Derumier [Fri, 10 May 2019 04:37:02 +0000 (06:37 +0200)]
mstpctl: don't load module if missing /sbin/mstpctl

2 months agobatman_adv: don't load module if missing batctl
Alexandre Derumier [Fri, 10 May 2019 04:28:17 +0000 (06:28 +0200)]
batman_adv: don't load module if missing batctl

2 months agolinkutils: _bridge_attrs_fill: use sysfs
Alexandre Derumier [Fri, 10 May 2019 04:23:52 +0000 (06:23 +0200)]
linkutils: _bridge_attrs_fill: use sysfs

2 months agodon't change interface forwarding value if not defined
Alexandre Derumier [Sat, 4 May 2019 13:12:00 +0000 (15:12 +0200)]
don't change interface forwarding value if not defined

2 months agodebian: changelog: update 1.2.6-1 entry before release
Julien Fortin [Mon, 22 Apr 2019 03:05:12 +0000 (11:05 +0800)]
debian: changelog: update 1.2.6-1 entry before release

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: bridge: down: when ifreload_down_changed=1: purge bridge and upper devices...
Julien Fortin [Fri, 22 Mar 2019 07:35:18 +0000 (15:35 +0800)]
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>
2 months agoaddons: addressvirtual: vrrp: protodown new macvlans
Quentin Young [Tue, 19 Mar 2019 17:26:45 +0000 (17:26 +0000)]
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>
2 months agoaddons: bridge: don't disable ipv6 on vlan-aware vxlan-bridge
Julien Fortin [Fri, 15 Mar 2019 16:25:26 +0000 (00:25 +0800)]
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>
2 months agoaddons: bridge: get default mcsnoop value when bridge_vxlan is not set
Julien Fortin [Wed, 13 Mar 2019 07:23:54 +0000 (15:23 +0800)]
addons: bridge: get default mcsnoop value when bridge_vxlan is not set

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months ago.gitignore: pycharm remote execution update
Julien Fortin [Thu, 31 Jan 2019 07:22:09 +0000 (15:22 +0800)]
.gitignore: pycharm remote execution update

To work on ifupdown2 i'm using Pycharm on macOS. ifupdown2 runs in a
debian VM. To use Pycharm remote execution capabilities, we need several
symlinks (one per command). Git needs to ignore those symlinks :)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agonlpacket: vxlan: encode: fix payload length
Julien Fortin [Fri, 8 Mar 2019 11:58:34 +0000 (12:58 +0100)]
nlpacket: vxlan: encode: fix payload length

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: vrrp: set addrgen mode random on VRRP macvlans
Julien Fortin [Thu, 7 Mar 2019 18:22:09 +0000 (19:22 +0100)]
addons: addressvirtual: vrrp: set addrgen mode random on VRRP macvlans

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: bridge: check kernel state for igmp snooping on vxlan brport
Julien Fortin [Thu, 7 Mar 2019 18:11:16 +0000 (19:11 +0100)]
addons: bridge: check kernel state for igmp snooping on vxlan brport

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: vrrp: fix multiline-merge attribute detection
Julien Fortin [Thu, 7 Mar 2019 17:43:10 +0000 (18:43 +0100)]
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>
2 months agoaddons: addressvirtual: vrrp: fix macvlan name to include vrrp id
Julien Fortin [Tue, 5 Mar 2019 17:44:57 +0000 (18:44 +0100)]
addons: addressvirtual: vrrp: fix macvlan name to include vrrp id

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agodebian: changelog: 1.2.6-1: update changelog entry for new release
Julien Fortin [Tue, 5 Mar 2019 09:51:56 +0000 (10:51 +0100)]
debian: changelog: 1.2.6-1: update changelog entry for new release

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: vrrp: remove macvlan device when all ipvX addrs are removed
Julien Fortin [Wed, 27 Feb 2019 21:40:55 +0000 (22:40 +0100)]
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>
2 months agoaddons: ethtool: raise error on ethtool command failure
Julien Fortin [Thu, 28 Feb 2019 14:34:58 +0000 (15:34 +0100)]
addons: ethtool: raise error on ethtool command failure

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: bridge: add new policy vxlan_bridge_igmp_snooping_enable_port_mcrouter
Julien Fortin [Tue, 26 Feb 2019 23:11:36 +0000 (00:11 +0100)]
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>
2 months agoaddons: addressvirtual: create VRRP macvlans in bridge mode
Julien Fortin [Tue, 26 Feb 2019 17:58:22 +0000 (18:58 +0100)]
addons: addressvirtual: create VRRP macvlans in bridge mode

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: vrrp: base macvlan prefix on parent ifindex
Julien Fortin [Tue, 26 Feb 2019 17:30:25 +0000 (18:30 +0100)]
addons: addressvirtual: vrrp: base macvlan prefix on parent ifindex

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: make sure vrr macvlans names are 15 chars long max
Julien Fortin [Tue, 19 Feb 2019 22:14:03 +0000 (23:14 +0100)]
addons: addressvirtual: make sure vrr macvlans names are 15 chars long max

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: delete macvlan when vrrp config is removed (ifreload case)
Julien Fortin [Fri, 15 Feb 2019 10:29:43 +0000 (11:29 +0100)]
addons: addressvirtual: delete macvlan when vrrp config is removed (ifreload case)

Add a vrrp config under swp intf - ifup, then remove the vrrp config - ifreload
the macvlans are not removed without this patch

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: vxlan: add support for vxlan-ttl attribute
Julien Fortin [Fri, 25 Jan 2019 10:06:39 +0000 (18:06 +0800)]
addons: vxlan: add support for vxlan-ttl attribute

New vxlan-ttl attribute: specifies the TTL value to use in outgoing
packets. Valid values: range 1..255 or auto (0)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: addressvirtual: add support for VRRP attribute
Julien Fortin [Fri, 25 Jan 2019 01:58:25 +0000 (09:58 +0800)]
addons: addressvirtual: add support for VRRP attribute

syntax: vrrp ID ip[4|6]

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2 months agoaddons: bridge: fix 'NoneType' object has no attribute '__getitem__' error
Julien Fortin [Fri, 19 Apr 2019 09:14:21 +0000 (17:14 +0800)]
addons: bridge: fix 'NoneType' object has no attribute '__getitem__' error

Fixes #90

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
5 months agodebian: changelog: update 1.2.5-1 timestamp entry 1.2.5-1
Julien Fortin [Mon, 21 Jan 2019 03:01:13 +0000 (11:01 +0800)]
debian: changelog: update 1.2.5-1 timestamp entry

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
5 months agoscheduler: ifupdown2 scripts: log warning on EACCES exception (Fixes #89)
Julien Fortin [Thu, 17 Jan 2019 03:45:35 +0000 (11:45 +0800)]
scheduler: ifupdown2 scripts: log warning on EACCES exception (Fixes #89)

ifupdown2 behaviour significantly diverges from ifupdown on debian stretch.
Original ifupdown uses run-parts which supposedly doesn't run non-executable
files in the directory. However, ifupdown2 doesn't seem to make this
distinction.
This patch will log warning EACCES exceptions (instead of log error) and exit 0

Reported-by: George Diamantopoulos <gedia>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agosetup.py: update copyright year (2019)
Julien Fortin [Thu, 17 Jan 2019 04:34:59 +0000 (12:34 +0800)]
setup.py: update copyright year (2019)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agosetup.py: bump version number to 1.2.5
Julien Fortin [Thu, 17 Jan 2019 04:34:30 +0000 (12:34 +0800)]
setup.py: bump version number to 1.2.5

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: install sysvinit script (Fixes: #26)
Julien Fortin [Thu, 17 Jan 2019 03:22:26 +0000 (11:22 +0800)]
debian: install sysvinit script (Fixes: #26)

Fixes github issue #26 and debian bug #918775

Reported-by: Joerg Dorchain <joerg@dorchain.net>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Co-authored-by: Joerg Dorchain <joerg@dorchain.net>
Co-authored-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: postinst: remove diversion after upgrade from stretch
Julien Fortin [Wed, 16 Jan 2019 09:19:45 +0000 (17:19 +0800)]
debian: postinst: remove diversion after upgrade from stretch

closes: #919443

Reported-by: Andreas Beckmann <anbe@debian.org>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agostatemanager: configure state_dir via ifupdown2.conf
Julien Fortin [Fri, 11 Jan 2019 04:00:39 +0000 (12:00 +0800)]
statemanager: configure state_dir via ifupdown2.conf

ifupdown2 used /var/tmp/network/ to store its state file
upstream users reported that when /var/tmp is not mounted
before network configuration ifupdown2 fails. We now let
user define which location they want to use for the state
file.

closes: #918832

Reported-by: Maximilian Wilhelm <max@sdn.clinic>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agolog: use stderr if syslog initialization fails
Julien Fortin [Sun, 30 Dec 2018 15:43:50 +0000 (22:43 +0700)]
log: use stderr if syslog initialization fails

closes: #917534

Reported-by: Joerg Dorchain <joerg@dorchain.net>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: changelog: add debian revision and refactor 1.2.2-1 entry 1.2.2-1
Julien Fortin [Thu, 20 Dec 2018 09:40:41 +0000 (10:40 +0100)]
debian: changelog: add debian revision and refactor 1.2.2-1 entry

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: changelog: add B.A.T.M.A.N. changelog entry
Julien Fortin [Thu, 20 Dec 2018 08:48:43 +0000 (09:48 +0100)]
debian: changelog: add B.A.T.M.A.N. changelog entry

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: control: add python-pkg-resources to suggested dependencies-list
Julien Fortin [Wed, 19 Dec 2018 19:34:53 +0000 (20:34 +0100)]
debian: control: add python-pkg-resources to suggested dependencies-list

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agoman: remove non-implemented -m option (closes: #905572)
Julien Fortin [Wed, 19 Dec 2018 19:04:33 +0000 (20:04 +0100)]
man: remove non-implemented -m option (closes: #905572)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: changelog: tag older version with UNRELEASED tag
Julien Fortin [Wed, 19 Dec 2018 17:56:31 +0000 (18:56 +0100)]
debian: changelog: tag older version with UNRELEASED tag

some of those release were available but under a different name so
technically those version numbers were never released.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: source: format: moving to non-native package
Julien Fortin [Wed, 19 Dec 2018 17:56:02 +0000 (18:56 +0100)]
debian: source: format: moving to non-native package

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agodebian: control: update debhelper dependency and drop dh-systemd
Julien Fortin [Wed, 19 Dec 2018 17:46:21 +0000 (18:46 +0100)]
debian: control: update debhelper dependency and drop dh-systemd

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agoLinkUtils: tunnel_change: do not purge the cache on tunnel change
Sven Auhagen [Wed, 19 Dec 2018 10:32:28 +0000 (11:32 +0100)]
LinkUtils: tunnel_change: do not purge the cache on tunnel change

Author: Sven Auhagen <Sven.Auhagen@voleatech.de>

6 months agoaddons: batman_adv: import and IO api refactoring
Julien Fortin [Wed, 19 Dec 2018 06:14:15 +0000 (07:14 +0100)]
addons: batman_adv: import and IO api refactoring

The new code base supports installation via pypi so we need to update the
imports statement.
It's also good practice to use the existing IO apis to read/write and execute
sub-commands, those API will do error handling and logging.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agoAdd addon module for B.A.T.M.A.N. advanced interface configuration. #12
Maximilian Wilhelm [Wed, 19 Dec 2018 06:07:42 +0000 (07:07 +0100)]
Add addon module for B.A.T.M.A.N. advanced interface configuration. #12

batman wasn't in master-next so it got removed during the last merge
this commit adds it back to master.
See PR #12

From Maximilian Wilhelm:
  This commit adds support for configuring B.A.T.M.A.N. advanced interfaces
  with ifupdown2. B.A.T.M.A.N. advanced is a protocol to build Layer2 based
  mesh networks with. It's supported in the Linux kernel and thus available
  in many Linux environments.

  A configuration could look like this

  auto bat0
  iface bat0
      batman-ifaces eth1 eth2.23
      batman-ifaces-ignore-regex .*_nodes
      batman-hop-penalty 23
      #
      address 192.0.2.42/24

  where »bat0« would be the local connection to the mesh network.

  The interfaces »eth1« and »eth2.23« would be used by the B.A.T.M.A.N. adv.
  protocol to communicate to other member of the mesh network.

  Any interfaces matching the »ifaces-ignore-regex« will be gently ignored
  by ifquery and ifreload as there might be some tunnels or interfaces
  added to the mesh network by other means which should not be removed by
  any subsequent ifreload run.

  The »hop-penalty» parameter set the penalty of this node within the mesh
  network.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Author: Maximilian Wilhelm <max@rfc2324.org>

6 months agoaddons: tunnel: fix tunnel creation (#80)- master branch refactoring
Julien Fortin [Tue, 18 Dec 2018 16:05:30 +0000 (17:05 +0100)]
addons: tunnel: fix tunnel creation (#80)- master branch refactoring

During the recent merge between master and master-next the changes introduced
by PR #80 were lost. This commit adds them back with some refactoring to use
the new netlink cache.

Co-authored-by: Maximilian Wilhelm <max@sdn.clinic>
Co-authored-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
6 months agonetlink: add tunnel device support in ipcmd cache
Julien Fortin [Tue, 18 Dec 2018 14:58:11 +0000 (15:58 +0100)]
netlink: add tunnel device support in ipcmd cache

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agonlpacket: add decode support for tunnel devices
Julien Fortin [Tue, 18 Dec 2018 12:27:09 +0000 (13:27 +0100)]
nlpacket: add decode support for tunnel devices

Tunnel device now supported (decode):
- gre
- gretap
- erspan
- ip6gre
- ip6gretap
- ip6erspan
- ipip
- sit
- ip6tnl
- vti
- vti6

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: new entry for version 1.2.2
Julien Fortin [Fri, 14 Dec 2018 01:09:46 +0000 (17:09 -0800)]
debian: changelog: new entry for version 1.2.2

ifupdown2 (1.2.2) unstable; urgency=medium

  * Support for new iproute2 format (bridge vlan show)
  * Pypi install: local addons modules should be loaded first
  * Fix: link-down yes on vrf slaves
  * Fix: nlmanager: use strerror to format kernel error
  * Add: new checks for existing device with vxlan attributes
  * Ethtool: FEC: translate None and NotSupported values to link-fec off

 -- Julien Fortin <julien@cumulusnetworks.com>  Thu, 13 Dec 2018 23:42:42 -0800

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoconfig: local addons modules should be loaded first
Julien Fortin [Thu, 6 Dec 2018 18:56:50 +0000 (10:56 -0800)]
config: local addons modules should be loaded first

ifupdown2 can be installed via apt/dpkg or via pypi (pip), those two installation methods have
two different installation directory. Our main installation dir is /usr/share/ifupdown2. This is
also were other scripts might add their own addon.
If ifupdown2 is installed via pypi we need to make sure we are loading the script-added addon modules

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: vrf: fix link-down yes on vrf slaves
Julien Fortin [Thu, 6 Dec 2018 18:40:48 +0000 (10:40 -0800)]
addons: vrf: fix link-down yes on vrf slaves

because of a typo (use of wrong object) we weren't looking at the correct
ifaceobj for LINK_DOWN lookup. In some cases we didn't honor link-down yes
on VRF slaves

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: vxlan: if device exists check that it's a vxlan (link_kind)
Julien Fortin [Tue, 4 Dec 2018 23:54:05 +0000 (15:54 -0800)]
addons: vxlan: if device exists check that it's a vxlan (link_kind)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: ethtool: FEC: translate None and NotSupported values to link-fec off
Julien Fortin [Sat, 1 Dec 2018 01:16:01 +0000 (17:16 -0800)]
addons: ethtool: FEC: translate None and NotSupported values to link-fec off

$ /sbin/ethtool --show-fec swp42
FEC parameters for swp42:
FEC encodings   : None
$ ifquery swp42
auto swp42
iface swp42
      link-fec off

$ ifreload -av |& grep ethtool
info: executing /sbin/ethtool swp42
info: executing /sbin/ethtool --show-fec swp42
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agonlmanager: use strerror to deal with kernel error
Julien Fortin [Fri, 30 Nov 2018 01:14:35 +0000 (17:14 -0800)]
nlmanager: use strerror to deal with kernel error

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoifupdownaddons: LinkUtils: bridge vlan show: add support for new iproute2 format
Julien Fortin [Thu, 29 Nov 2018 08:27:02 +0000 (00:27 -0800)]
ifupdownaddons: LinkUtils: bridge vlan show: add support for new iproute2 format

A newer iproute2 version changed the bridge vlan show output, ifupdown2 relies
on the previous format, we have the convert  data into old format:

{
   "vx-1002": [{
        "vlan": 1002,
        "flags": ["PVID", "Egress Untagged"]
    }],
    "vx-1004": [{
        "vlan": 1004,
        "flags": ["PVID", "Egress Untagged"]
    }]
 }

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports vx-1000 vx-1001 vx-1002 vx-1003 vx-1004 hostbond3 hostbond4
        bridge-stp on
        bridge-vids 1000-1004
        bridge-pvid 1

auto vx-1002
iface vx-1002
        vxlan-id 1002
        bridge-access 1002
        vxlan-local-tunnelip 27.0.0.15
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

auto hostbond4
iface hostbond4
        bond-slaves swp2 swp3
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu 9152
        alias Local Node/s TORS1 and Ports swp32s2 swp32s3 <==> Remote  Node/s HOSTS12 and Ports swp1 swp2
        bridge-pvid 1001

auto swp3
iface swp3
        link-speed 10000
        link-duplex full
        link-autoneg off

auto swp2
iface swp2
        link-speed 10000
        link-duplex full
        link-autoneg off

auto vx-1004
iface vx-1004
        vxlan-id 1004
        bridge-access 1004
        vxlan-local-tunnelip 27.0.0.15
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

auto vx-1003
iface vx-1003
        vxlan-id 1003
        bridge-access 1003
        vxlan-local-tunnelip 27.0.0.15
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

auto hostbond3
iface hostbond3
        bond-slaves swp5 swp6
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu 9152
        alias Local Node/s TORS1 and Ports swp32s0 swp32s1 <==> Remote  Node/s HOSTS11 and Ports swp1 swp2
        bridge-pvid 1000

auto swp6
iface swp6
        link-speed 10000
        link-duplex full
        link-autoneg off

auto swp5
iface swp5
        link-speed 10000
        link-duplex full
        link-autoneg off

auto vx-1001
iface vx-1001
        vxlan-id 1001
        bridge-access 1001
        vxlan-local-tunnelip 27.0.0.15
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

auto vx-1000
iface vx-1000
        vxlan-id 1000
        bridge-access 1000
        vxlan-local-tunnelip 27.0.0.15
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: bridge: add "None" check (string) for unsupported bridge attr on some systems
Julien Fortin [Wed, 14 Nov 2018 20:52:45 +0000 (21:52 +0100)]
addons: bridge: add "None" check (string) for unsupported bridge attr on some systems

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoAdd python-setuptools as required preinstalled package
Rostislav Kandilarov [Mon, 12 Nov 2018 23:01:56 +0000 (01:01 +0200)]
Add python-setuptools as required preinstalled package

On some kind-of-minimalistic  Ubuntu 18.04.1 extra python package `python-setuptools` was needed in order to compile from source the final DEB.

```
dpkg-buildpackage: info: source version 1.2.1
dpkg-buildpackage: info: source changed by Julien Fortin <julien@cumulusnetworks.com>
 dpkg-source --before-build ifupdown2
dpkg-buildpackage: info: host architecture amd64
dpkg-checkbuilddeps: error: Unmet build dependencies: python-setuptools
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
```

7 months agoaddons: vxlan: modinfo: remove vxlan-port validval
Julien Fortin [Mon, 5 Nov 2018 19:04:58 +0000 (20:04 +0100)]
addons: vxlan: modinfo: remove vxlan-port validval

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: bridge: modinfo: bridge-portmcfl remove validrange attribute
Julien Fortin [Mon, 5 Nov 2018 19:09:09 +0000 (20:09 +0100)]
addons: bridge: modinfo: bridge-portmcfl remove validrange attribute

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: ethtool: fec: only use and compare lowercase data
Julien Fortin [Tue, 6 Nov 2018 00:35:37 +0000 (01:35 +0100)]
addons: ethtool: fec: only use and compare lowercase data

on --show-fec ethtool seems to return fec in uppercase while
we only advertise lowercase validvals. We should only deal
and compare lowercase values for running, config and default

root@host:/home/cumulus# /sbin/ethtool --show-fec swp29
FEC parameters for swp29:
FEC encodings   : RS
root@host:/home/cumulus#

testing:
set: link-fec rs
ifup/ifreloads

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: bond: catch exception and log.info on modprobe failure
Julien Fortin [Mon, 5 Nov 2018 19:15:09 +0000 (20:15 +0100)]
addons: bond: catch exception and log.info on modprobe failure

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoifupdown2.conf: enable addon_scripts_support and disable addon_syntax_check
Julien Fortin [Wed, 31 Oct 2018 14:42:06 +0000 (15:42 +0100)]
ifupdown2.conf: enable addon_scripts_support and disable addon_syntax_check

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: address: new l3_intf_default_gateway_set_onlink policy closes #54
Julien Fortin [Tue, 30 Oct 2018 10:31:11 +0000 (11:31 +0100)]
addons: address: new l3_intf_default_gateway_set_onlink policy closes #54

As shown in the following example, ifupdown1 sets the default route with the
onlink attribute. This patch will add this capability to ifupdown2 controlled
by a policy variable in the address module: "l3_intf_default_gateway_set_onlink"
default to on

[19:16:07] root:~ # cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet static
      address 78.46.193.234/32
      gateway 172.31.1.1
[19:16:19] root:~ # ifup -a -v
ifup: configuring interface enp0s3=enp0s3 (inet)
...
/bin/ip addr add 78.46.193.234/255.255.255.255 broadcast 78.46.193.234   dev enp0s3 label enp0s3
/bin/ip link set dev enp0s3   up
/bin/ip route add default via 172.31.1.1  dev enp0s3 onlink
...
[19:16:21] root:~ # ip route show
default via 172.31.1.1 dev enp0s3 onlink
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15
169.254.0.0/16 dev enp0s3 scope link metric 1000
[19:16:21] root:~ #

$ cat /etc/network/ifupdown2/policy.d/address.json
{
    "address": {
"module_globals": {
    "l3_intf_default_gateway_set_onlink": "yes"
}
    }
}
$ ifquery swp1
auto swp1
iface swp1 inet static
address 78.46.193.234/32
gateway 172.31.1.1

$ ifreload -av |& grep "route add default"
info: executing /bin/ip route add default via 172.31.1.1 proto kernel dev swp1 onlink
$
$
$ emacs -nw /etc/network/ifupdown2/policy.d/address.json
$ cat /etc/network/ifupdown2/policy.d/address.json
{
    "address": {
"module_globals": {
    "l3_intf_default_gateway_set_onlink": "no"
}
    }
}
$ ifdown -a -X eth0
$ ifreload -av |& grep "route add default"
info: executing /bin/ip route add default via 172.31.1.1 proto kernel dev swp1
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: update all entry to unstable distribution
Julien Fortin [Tue, 30 Oct 2018 14:46:54 +0000 (15:46 +0100)]
debian: changelog: update all entry to unstable distribution

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: 1.2.1: set RELEASED
Julien Fortin [Tue, 30 Oct 2018 13:56:29 +0000 (14:56 +0100)]
debian: changelog: 1.2.1: set RELEASED

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: address: remplace sysctl calls with /proc/ read/write
Julien Fortin [Mon, 29 Oct 2018 13:20:19 +0000 (14:20 +0100)]
addons: address: remplace sysctl calls with /proc/ read/write

Ticket: CM-21809
Reviewed By: Roopa
Testing Done:

<% num_vlans = 2048 %>
% for i in range(2,10):
%   for j in range(2,num_vlans+2):
auto br${i}_${j}
iface br${i}_${j}
      bridge-ports swp${i}.${j}
      bridge-vlan-aware no
      bridge-stp no
      bridge-learning swp${i}.${j}=off
%   endfor
% endfor

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: update 1.2.1 entry
Julien Fortin [Tue, 30 Oct 2018 10:14:52 +0000 (11:14 +0100)]
debian: changelog: update 1.2.1 entry

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: 1.2.1: update entry date
Julien Fortin [Mon, 29 Oct 2018 11:29:31 +0000 (12:29 +0100)]
debian: changelog: 1.2.1: update entry date

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: vxlan: attr vxlan-port: add DRYRUN check
Julien Fortin [Fri, 26 Oct 2018 16:48:49 +0000 (18:48 +0200)]
addons: vxlan: attr vxlan-port: add DRYRUN check

-n sets DRYRUN flags, when DRYRUN is set many functions return True
(like link_exists), in this case vxlanattrs is set to False because
not cached. But since link_exists=True we still try to access it like
a dictionary.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: address: don't reset ip addrgen on dhcp intf
Julien Fortin [Tue, 23 Oct 2018 10:15:17 +0000 (12:15 +0200)]
addons: address: don't reset ip addrgen on dhcp intf

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoFix gretunnels
Sven Auhagen [Mon, 29 Oct 2018 05:55:25 +0000 (06:55 +0100)]
Fix gretunnels

7 months agodebian: watch: removing watch file according to debian-watch-file-in-native-package...
Julien Fortin [Mon, 22 Oct 2018 11:26:37 +0000 (13:26 +0200)]
debian: watch: removing watch file according to debian-watch-file-in-native-package (lintian warning)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: add l3_intf_arp_accept policy to 1.2.1 entry
Julien Fortin [Mon, 22 Oct 2018 10:06:19 +0000 (12:06 +0200)]
debian: changelog: add l3_intf_arp_accept policy to 1.2.1 entry

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: address: add l3_intf_arp_accept policy to control ARP_ACCEPT
Julien Fortin [Fri, 19 Oct 2018 15:42:24 +0000 (17:42 +0200)]
addons: address: add l3_intf_arp_accept policy to control ARP_ACCEPT

$ cat /var/lib/ifupdown2/policy.d/address.json | grep l3_intf_arp_accept
      "l3_intf_arp_accept": "0"
$ ifreload -ad |& grep arp
debug: bridge: init: arp_nd_suppress_only_on_vxlan=True
info: writing '0' to file /proc/sys/net/ipv4/conf/br0/arp_accept
$
$
$ emacs -nw /var/lib/ifupdown2/policy.d/address.json
$
$ cat /var/lib/ifupdown2/policy.d/address.json | grep l3_intf_arp_accept
      "l3_intf_arp_accept": "1"
$
$ ifreload -ad |& grep arp
debug: bridge: init: arp_nd_suppress_only_on_vxlan=True
info: writing '1' to file /proc/sys/net/ipv4/conf/br0/arp_accept
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: addressvirtual: ifquery -r doesn't display link-local address
Julien Fortin [Mon, 8 Oct 2018 13:18:32 +0000 (15:18 +0200)]
addons: addressvirtual: ifquery -r doesn't display link-local address

The issue here lies with how we query the cache to get the ips addresses
configured on the macvlan. A few months ago we added support for link scope
addresses in the cache, since the kernel may add it's own link addresse to
some interfaces we need to filter them out when querying the cache (because
we just want to get the list of IPs managed by ifupdown2). To perform this
filtering we need to look at the current user configuration (/e/n/i) but we
also need to look at past configuration. To perform this filtering we need
to provide the API LinkUtils:get_running_addrs a special parameter for
address-virtual (we need an ifaceobj).

$ ifquery -a
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto vlan1000
iface vlan1000
address 192.168.10.2/24
address fc00:10::2/64
address-virtual 00:00:5e:00:01:01 192.168.10.1/24 fc00:10::1/64 fe80::1/64
address-virtual-ipv6-addrgen off
vlan-id 1000
vlan-raw-device bridge
vrf blue

auto bridge
iface bridge
bridge-ports swp1

auto blue
iface blue
vrf-table auto

$ ifreload -a
$ echo $?
0
$ ifquery -a -c
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp                                                [pass]

auto vlan1000
iface vlan1000                                                      [pass]
vlan-raw-device bridge                                      [pass]
vlan-id 1000                                                [pass]
vrf blue                                                    [pass]
address 192.168.10.2/24                                     [pass]
address fc00:10::2/64                                       [pass]
address-virtual 00:00:5e:00:01:01 192.168.10.1/24 fc00:10::1/64 fe80::1/64     [pass]
address-virtual-ipv6-addrgen off                            [pass]

auto bridge
iface bridge                                                        [pass]
bridge-ports swp1                                           [pass]

auto blue
iface blue                                                          [pass]
vrf-table 1001                                              [pass]

$ ifquery -r vlan1000
auto vlan1000
iface vlan1000
vlan-id 1000
vlan-protocol 802.1Q
vlan-raw-device bridge
address 192.168.10.2/24
address fc00:10::2/64
address-virtual 00:00:5e:00:01:01 192.168.10.1/24 fe80::1/64 fc00:10::1/64
address-virtual-ipv6-addrgen off

$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoadodns: bridge: bridge-[port]mcrouter enhance modinfo helper
Julien Fortin [Fri, 12 Oct 2018 12:29:24 +0000 (14:29 +0200)]
adodns: bridge: bridge-[port]mcrouter enhance modinfo helper

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: vxlan: fix vxlan-port example type
Julien Fortin [Fri, 12 Oct 2018 11:59:47 +0000 (13:59 +0200)]
addons: vxlan: fix vxlan-port example type

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: address: up_ipv6_addrgen: add PERFMODE check
Julien Fortin [Thu, 11 Oct 2018 01:12:43 +0000 (03:12 +0200)]
addons: address: up_ipv6_addrgen: add PERFMODE check

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agonlpacket:: add family string (AF_*) to debug dump
Julien Fortin [Tue, 9 Oct 2018 14:06:24 +0000 (16:06 +0200)]
nlpacket:: add family string (AF_*) to debug dump

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agonlpacket:: add netconf support (RTM_GETNETCONF/RTM_NEWNETCONF)
Julien Fortin [Wed, 29 Aug 2018 15:21:54 +0000 (17:21 +0200)]
nlpacket:: add netconf support (RTM_GETNETCONF/RTM_NEWNETCONF)

$ cd python-nlmanager/examples
$ ./netconf_show.py
    2018-06-01 16:59:02,398   DEBUG: TXed RTM_GETNETCONF, length 32, seq 1, pid 14202, flags 0x0 ()

      Netlink Header
       1: 0x20000000   ...  Length 0x00000020 (32)
       2: 0x52000503  R...  Type 0x0052 (82 - RTM_GETNETCONF), Flags 0x0305 (NLM_F_REQUEST, NLM_F_ACK, NLM_F_DUMP)
       3: 0x01000000  ....  Sequence Number 0x00000001 (1)
       4: 0x7a370000  z7..  Process ID 0x0000377a (14202)
      Service Header
       5: 0x00000000  ....  Family 0x00 (0), Device Type 0x0000 (0 - ARPHRD_NETROM)
       6: 0x00000000  ....  Interface Index 0x00000000 (0)
       7: 0x00000000  ....  Device Flags 0x00000000 ()
       8: 0x00000000  ....  Change Mask 0x00000000
      Attributes

    Attributes Summary
    {}

    2018-06-01 16:59:02,401   DEBUG: RXed RTM_NEWNETCONF, length 68, seq 1, pid 14202, flags 0x2

      Netlink Header
       1: 0x44000000  D...  Length 0x00000044 (68)
       2: 0x50000200  P...  Type 0x0050 (80 - RTM_NEWNETCONF), Flags 0x0002 (NLM_F_MULTI)
       3: 0x01000000  ....  Sequence Number 0x00000001 (1)
       4: 0x7a370000  z7..  Process ID 0x0000377a (14202)
      Service Header
       1: 0x00000002  ....  Family 0x02 (2)
      Attributes
       5: 0x08000100  ....  Length 0x0008 (8), Type 0x0001 (1) NETCONFA_IFINDEX
       6: 0x01000000  ....  1
       7: 0x08000200  ....  Length 0x0008 (8), Type 0x0002 (2) NETCONFA_FORWARDING
       8: 0x01000000  ....  1
       9: 0x08000300  ....  Length 0x0008 (8), Type 0x0003 (3) NETCONFA_RP_FILTER
      10: 0x00000000  ....  0
      11: 0x08000400  ....  Length 0x0008 (8), Type 0x0004 (4) NETCONFA_MC_FORWARDING
      12: 0x00000000  ....  0
      13: 0x08000500  ....  Length 0x0008 (8), Type 0x0005 (5) NETCONFA_PROXY_NEIGH
      14: 0x00000000  ....  0
      15: 0x08000600  ....  Length 0x0008 (8), Type 0x0006 (6) NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN
      16: 0x01000000  ....  1

    Attributes Summary
    {'( 1) NETCONFA_IFINDEX': 1,
     '( 2) NETCONFA_FORWARDING': 1,
     '( 3) NETCONFA_RP_FILTER': 0,
     '( 4) NETCONFA_MC_FORWARDING': 0,
     '( 5) NETCONFA_PROXY_NEIGH': 0,
     '( 6) NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN': 1}

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: bridge: read bridge multicast_v4_queriers from sysfs
Julien Fortin [Tue, 2 Oct 2018 16:43:50 +0000 (18:43 +0200)]
addons: bridge: read bridge multicast_v4_queriers from sysfs

➜  ~ ifquery -a
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto br0
iface br0
      bridge-ports swp2
      bridge-mcqv4src 100=172.16.100.1 101=172.16.101.1

➜  ~ ifup br0 -v
...
info: executing /sbin/brctl showmcqv4src br0
info: executing /sbin/brctl setmcqv4src br0 100 172.16.100.1
info: executing /sbin/brctl setmcqv4src br0 101 172.16.101.1
...
➜  ~ ifquery br0 -c
auto br0
iface br0                                                           [pass]
      bridge-ports swp2                                           [pass]
      bridge-mcqv4src 100=172.16.100.1 101=172.16.101.1           [pass]

➜  ~

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoman: ifquery: fix conflicting documentation about ifquery -i flag
Julien Fortin [Mon, 1 Oct 2018 14:28:27 +0000 (16:28 +0200)]
man: ifquery: fix conflicting documentation about ifquery -i flag

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddon: ethtool: link-speed: add 10 to valid values array
Julien Fortin [Mon, 1 Oct 2018 14:23:49 +0000 (16:23 +0200)]
addon: ethtool: link-speed: add 10 to valid values array

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: add link-fec changelog entry (release 1.2.1)
Julien Fortin [Tue, 9 Oct 2018 19:31:44 +0000 (21:31 +0200)]
debian: changelog: add link-fec changelog entry (release 1.2.1)

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoREADME: update deb version (1.2.1)
Julien Fortin [Tue, 9 Oct 2018 15:38:40 +0000 (17:38 +0200)]
README: update deb version (1.2.1)

7 months agoaddons: bridge: add "none" to the bridge-ports validvals (closes #75)
Julien Fortin [Mon, 24 Sep 2018 15:59:14 +0000 (17:59 +0200)]
addons: bridge: add "none" to the bridge-ports validvals (closes #75)

--syntax-check was failing because "none" was missing in the validvals list for bridge-ports
closes #75

Reported-by: Alexandre Derumier <aderumier@odiso.com>
7 months agoREADME: update dependency list: fakeroot, build-essential
Julien Fortin [Mon, 24 Sep 2018 08:10:06 +0000 (10:10 +0200)]
README: update dependency list: fakeroot, build-essential

7 months agoREADME: update build dependency list
Julien Fortin [Mon, 24 Sep 2018 08:06:30 +0000 (10:06 +0200)]
README: update build dependency list

build dependency line was missing 'devscripts'

7 months agoaddons: ethtool: fix indentation error for link-fec attr
Anton Lindström [Sun, 9 Sep 2018 17:28:31 +0000 (19:28 +0200)]
addons: ethtool: fix indentation error for link-fec attr

Signed-off-by: Anton Lindström <carlantonlindstrom@gmail.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agodebian: changelog: update changelog for release 1.2.1
Julien Fortin [Sun, 2 Sep 2018 16:38:01 +0000 (18:38 +0200)]
debian: changelog: update changelog for release 1.2.1

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: vrf: fix link-down yes on vrf throws an exception
Julien Fortin [Mon, 20 Aug 2018 07:15:32 +0000 (09:15 +0200)]
addons: vrf: fix link-down yes on vrf throws an exception

before the patch we can see that ifreload is displaying an error
with the example config

$ ifquery -a
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto swp1
iface swp1
      vrf blue
         link-down yes

auto blue
iface blue
      vrf-table auto

$ ifreload -a
error: eth0: vrf blue not around, skipping vrf config
$ echo $?
1
$

$ # applying patch
$ ifreload -a
$ echo $?
0

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoaddons: bridge: ports l2protocol tunnel: fix TypeError exception
Julien Fortin [Thu, 16 Aug 2018 10:31:36 +0000 (12:31 +0200)]
addons: bridge: ports l2protocol tunnel: fix TypeError exception

ifquery may fail on the following exception:

File "/usr/share/ifupdown2/addons/bridge.py", line 709, in _query_check_l2protocol_tunnel_lldp
     return ifla_brport_group_mask & 0x4000
 TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
7 months agoifupdownaddons: mstpctlutils: cache empty 'showportdetail' results
Julien Fortin [Tue, 14 Aug 2018 16:49:39 +0000 (18:49 +0200)]
ifupdownaddons: mstpctlutils: cache empty 'showportdetail' results

mstpctl might return an empty result on: mstpctl showportdetail bridge json
the cache is not filled with an empty dict so next cache lookup will be a
cache miss and therefore, ifupdown2 thinks we need to fill the cache with fresh
data and will execute showportdetail again (resulting in calling mstpctl cmd
sometime 5 or 6 times in a row).

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>