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

1217 Commits

Author SHA1 Message Date
62511e718b Merge pull request #113 from robertobarreda/patch-1
ifupdownaddons: LinkUtils: fix cmd concatenation
2019-06-06 16:57:27 +08:00
174429766c fix cmd concatenation 2019-06-05 17:11:02 +02: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
bc029f2857 Merge pull request #109 from aderumier/fix-bridge-stp-user-space
Fix error message on ifquery when sysctl bridge-stp-user-space
2019-06-03 18:04:36 +08:00
848bf7aa85 Fix error message on ifquery when sysctl bridge-stp-user-space
This fix this kind of error:

error: bond0: cmd '/sbin/sysctl net.bridge.bridge-stp-user-space' failed: returned 255 (sysctl: cannot stat /proc/sys/net/bridge/bridge-stp-user-space: No such file or directory
)
error: fwpr103p0: cmd '/sbin/sysctl net.bridge.bridge-stp-user-space' failed: returned 255 (sysctl: cannot stat /proc/sys/net/bridge/bridge-stp-user-space: No such file or directory
)
2019-06-03 11:45:27 +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
e1aa03b031 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
2019-05-26 11:16:31 +08: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
fd58fb6c48 Merge pull request #104 from bauen1/fix-tunnel-vrf
ifupdown2addons: fix order of pre-up,vrf and pre-up,tunnel
2019-05-16 14:32:35 +08:00
ed50df81cd 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
2019-05-15 14:42:29 +02:00
973c2fcf67 Merge pull request #101 from aderumier/fix-forwarding
don't change interface forwarding value if not defined
2019-05-15 17:43:36 +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
3e8a915365 linkutils: _bridge_attrs_fill: use sysfs 2019-05-10 06:23:52 +02:00
42ef1cce92 don't change interface forwarding value if not defined 2019-05-04 15:12:00 +02:00
adf8e888e3 debian: changelog: update 1.2.6-1 entry before release
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 11:05:12 +08: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
6cd081d1d7 .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>
2019-04-22 10:54:51 +08:00
dbc23e6cbf nlpacket: vxlan: encode: fix payload length
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:53:59 +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
c3f1a1a064 debian: changelog: 1.2.6-1: update changelog entry for new release
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:52:21 +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
68c8d699db addons: addressvirtual: vrrp: base macvlan prefix on parent ifindex
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:49:29 +08:00
8fb6dd67b2 addons: addressvirtual: make sure vrr macvlans names are 15 chars long max
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:49:15 +08:00
709f7942a2 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>
2019-04-22 10:49:02 +08:00
ec25a08c3a 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>
2019-04-22 10:48:36 +08:00
5bc963f0ad addons: addressvirtual: add support for VRRP attribute
syntax: vrrp ID ip[4|6]

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:43:25 +08:00
1d35560dc6 addons: bridge: fix 'NoneType' object has no attribute '__getitem__' error
Fixes #90

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-04-22 10:30:05 +08:00
09f9afc782 debian: changelog: update 1.2.5-1 timestamp entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
1.2.5-1
2019-01-21 11:01:13 +08:00
739f9c7ea0 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>
2019-01-18 15:52:59 +08:00
a64d337ee6 setup.py: update copyright year (2019)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-01-17 12:41:25 +08:00
91d461673b setup.py: bump version number to 1.2.5
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-01-17 12:34:30 +08:00
35b9d035c1 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>
2019-01-17 12:26:47 +08:00
0aa3d31930 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>
2019-01-16 18:35:28 +08:00
9f98f3604e 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>
1.2.4-1
2019-01-11 12:08:10 +08:00
72ba456971 log: use stderr if syslog initialization fails
closes: #917534

Reported-by: Joerg Dorchain <joerg@dorchain.net>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
1.2.3-1
2018-12-30 22:45:47 +07:00
e28cc68413 debian: changelog: add debian revision and refactor 1.2.2-1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
1.2.2-1
2018-12-20 11:18:22 +01:00