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

340 Commits

Author SHA1 Message Date
36ac58231f addons: bridge: bridge-portmcrouter: reset to default 1 (automatic) if config is removed
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-26 12:06:53 +02:00
b2b8a2e6f4 addons: bridge: bridge-hashmax: upper limit of validrange to 65536
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-26 12:06:53 +02:00
3199dd8a0d addons: bond: ifquery-check: es-sys-mac value is not part of netlink dump for non-root run
For some reason es-sys-mac (IFLA_BOND_AD_ACTOR_SYSTEM) is not part
of the netlink dump if requested by non-root user. This commit adds
a log info and will ignore es-sys-mac in that case.

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-26 12:04:23 +02:00
e21ee6df28 bond: ifquery-check: translate user config es-sys-mac before comparing to netlink cache
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-26 12:04:20 +02:00
4e0f16d0cf addons: address: clear stale svi fdb entries when svi mac is changed
Three issues:
- when `hwaddress` is removed from an SVI (on top of a bridge), the svi
mac is not resetted back to the bridge mac: fixed
- when `hwaddress` is used on an svi, stale fdb enties were added with the
bridge mac: fixed
- on ifdown we were leaving a leftover fdb entry on the deleted svi: fixed

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-26 12:04:17 +02:00
30f615f2d6 addons: bond: fix ifquery for IFLA_BOND_ARP_IP_TARGET
dropping support for multiple ip in bond-arp-ip-target

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-25 00:44:28 +02:00
ddb633fe44 Merge pull request #138 from svenauhagen/feature/bondarpcheck
This patch adds the ability to use an ARP IP for the bond check.
2022-05-25 00:23:47 +02:00
10d57d9aaa addons: bridge: allow vlan sub interface in vlan-aware bridge (fixes #92)
New bridge policy:
allow-vlan-sub-interface-in-vlan-aware-bridge (default True)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-24 22:50:52 +02:00
e90c33ca6a addons: address: log error but continue when adding addresses (fixes #130)
Signed-off-by: bauen1 <j2468h@gmail.com>
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-24 22:05:16 +02:00
66381bcd32 Merge pull request #234 from sohorx/fix/dhcp_client_wait
dhcp: fix dhclient client killed on no wait
2022-05-24 12:47:48 +02:00
09334e7713 addons: dhcp: move policy log info to debug
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-05-23 16:07:58 +02:00
d0efa7d5f3 dhcp: fix dhclient client killed on no wait
When a policy dhcp-wait is false the dhcp client is run directly in
background.

But, in most cases, the client won't have the time to find an address
before a check occur.

This is making the client being killed nearly every time.

The obvious solution here is to not check ips differences when no-wait
is asked by the policy.
2022-05-02 12:30:02 +02:00
fdb535edd1 This patch adds the ability to use an ARP IP for the bond check.
It is only valid for balance-rr and balance-xor.

One Example is:

auto bond0
iface bond0 inet
        bond-slaves ens21 ens22
        bond-mode balance-rr
        bond-arp-interval 100
        bond-arp-ip-target 8.8.8.8
        address 10.10.10.1/24

Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>
2022-04-30 08:08:07 +02:00
cccf76e4c0 addons: address: dad-interval: adding log.info before sleep (#232)
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-04-29 16:20:17 +02:00
21a7bd2d91 address: check interface exists before settling dad 2022-04-08 16:00:25 +02:00
eb6ad1f78a addons: address: update modinfo for dad attributes
Help infos came from the ifupdown (original) manual.
2022-04-08 16:00:25 +02:00
d594fb86ca addons: address: up: wait on dad when needed 2022-04-08 16:00:25 +02:00
b99c724a89 addons: address: add a settle dad method
_settle_dad will allow ifupdown2 to wait on ipv6 dad tentative.
2022-04-08 16:00:25 +02:00
beaffab603 addons: address: disable dad on no attempts 2022-04-05 14:46:13 +02:00
f4764e0f96 addons: address: add dad handling module global
Upon ipv6_dad_handling_enabled module global parameter set to true, the
address addon will handle ipv6 dad tentatives by either
* set nodad when adding an ipv6 address
* waiting for dad to finish or warn of a timeout

This handling should be quick close to the ifupdown process.
2022-04-05 14:46:13 +02:00
3fd6c20143 Revert "Dad handling" 2022-03-25 14:29:51 +01:00
cccdaa46a8 addons: address: update modinfo for dad attributes
Help infos came from the ifupdown (original) manual.
2022-03-25 13:12:51 +01:00
06a49cda4f addons: address: up: wait on dad when needed 2022-03-25 13:12:51 +01:00
aa121e105e addons: address: add a settle dad method
_settle_dad will allow ifupdown2 to wait on ipv6 dad tentative.
2022-03-25 13:12:51 +01:00
33c30d13b1 addons: address: disable dad on no attempts 2022-03-25 12:36:41 +01:00
98743cb1ff addons: address: get new dad attributes
dad-attempts and dad-interval can now be taken from the interfaces
file.

Those attributes names came from ifupdown (original).
2022-03-25 12:30:27 +01:00
24d5192df2 addons: vlan: retry vlan creation if bridge_binding capability is missing
On older ubuntu version bridge_binding is not supported, we can't rely
on `ip link help` to detect this. We have manually check if the first
netlink request is rejected then retry with iproute2.

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2022-02-11 12:33:49 +01:00
9a26f48f99 Add support for xmit-hash-policy vlan+srcmac
Add support for xmit-hash-policy 5 - vlan+srcmac, added in Linux 5.12.
2022-01-05 13:51:15 +01:00
d290cfe8e7 addons: tunnel: new attribute: tunnel-tos
'tunnel-tos': {
    'help': 'TOS for tunnel packets (range 0..255), 1=inherit',
    "validrange": ["0", "255"],
    'validvals': ['<number>', 'inherit'],
    'required': False,
    'example': ['tunnel-tos inherit'],
    "aliases": ["tos"]
}

Signed-off-by: Alexander Petrovskiy <alexpe@nvidia.com>
2021-12-01 18:36:44 +03:00
4efd36fab0 addons: tunnel: add 'inherit' value to 'tunnel-ttl' attribute
Signed-off-by: Alexander Petrovskiy <alexpe@nvidia.com>
2021-12-01 17:43:29 +03:00
7d14f4d4e9 Merge pull request #170 from Jasperswaagman/master
Add none as valid value for bridge-ports on a bridge interface
2021-11-10 18:12:17 +01:00
970c72e437 addons: vxlan: fix lib.addon.Vxlan import (fixes: #217)
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-08-26 13:44:05 +02:00
c2b847f7af addons: introduces old_ifaceobjs to get_dependent_ifacenames
Other addon modules need to access the list of old ifaceobjs

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-06 12:46:02 +02:00
15666526bf usercmd: fix TypeError: unsupported operand type(s) for |: '_Environ' and 'dict'
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-06 12:38:44 +02:00
9a6a305084 cleanups - upstream sync
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-02 18:20:42 +02:00
f8ed376891 lib: nlcache: new netlink API "link_add" (waits for link creation)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-02 18:11:09 +02:00
790a55e93e addons: link: ifquery-check now validates admin state
[12:57:29] root:~ # ifquery -a
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto swp1
iface swp1
        post-up ip link set dev swp1 down

auto swp2
iface swp2
        link-down yes

auto swp3
iface swp3
        link-down no

auto swp4
iface swp4

[12:57:29] root:~ #
[12:57:29] root:~ #
[12:57:30] root:~ #
[12:57:30] root:~ # ifquery -ac
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp                                                [pass]

auto swp1
iface swp1 (link is down)                                           [fail]
        post-up ip link set dev swp1 down                               []

auto swp2
iface swp2                                                          [pass]
        link-down yes                                               [pass]

auto swp3
iface swp3                                                          [pass]
        link-down no                                                [pass]

auto swp4
iface swp4

[12:57:31] root:~ #

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-02 18:07:34 +02:00
859b8643b6 nlcache: link_set_address: override cache after mac address change is aacked
after a successful mac change we should override our cache so that we don't
keep stale values in cache (in case the cache is queried before the kernel
notification arrives)

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-02 15:24:00 +02:00
9ca87c5e8b addons: vxlan: ifquery-check: mcastgrp-map: use bridge vni show
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:54:09 +02:00
3376c23335 addons: vxlan: remove stale code (bridge fdb show call)
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:53:38 +02:00
b3a93dfce1 addons: vxlan: fix name 'vni_mcastgrp_map' is not defined
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:53:04 +02:00
d910b87c50 addons: vxlan: mcastgrp-map: remove validval attribute
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:51:45 +02:00
e7ecab23d9 addons: vxlan: refactoring code to allow updating an existing SVD
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:51:12 +02:00
20aabf550c addons: vxlan: fix mcast group get api during vni filter set
the mcast group set code was not using the right api
to get mcast groups.

Signed-off-by: Roopa Prabhu <roopa@nvidia.com>
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:48:24 +02:00
238e048507 addons: vxlan: remoteip-map: check user config against old config and not running state
'bridge flood macs are deleted everytime ifreload is triggered even without any changes to e/n/i config'
this was happening because ifupdown2 was checking the live fdb entries and calculating the delta between
the new and old config. Now we are simply checking the old and new ifupdown2 (/e/n/i) config to avoid
messing with macs added by the control plane

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:47:44 +02:00
d4403f1e77 addons: vxlan: ifquery-check: don't check fdb running state if mcastgrp-map or remoteip map are not configured
fdb entries can be added by FRR, so we won't be checking the running
state if there's no record of a user configuration in /e/n/i

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:47:08 +02:00
2b867068c6 addons: vxlan: allow svd config update
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:46:32 +02:00
8743434a25 addons: vxlan: add null list check when mcastgrp map not present
Signed-off-by: Roopa Prabhu <roopa@nvidia.com>
2021-07-01 19:45:43 +02:00
782aff35ce addons: vxlan: support for vxlan-support-mix-dev-types policy (default yes)
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:08:55 +02:00
db4371de3c addons: vxlan: error out when an unsupported mix of SVD and TVDs are configured
Currently mixing SVDs and TVDs on the same system is not supported,
regardless of whether they are in the same vlan-aware bridge or
across different ones. NVUE will configure all VNIs as SVDs by
default so this would hopefully only arise if a user edits
/etc/network/interfaces and manages their configuration with ifupdown2.

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-07-01 19:08:04 +02:00