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

1103 Commits

Author SHA1 Message Date
e7206159ed 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>
2018-12-13 15:18:00 -08:00
b067bba9b9 addons: vxlan: if device exists check that it's a vxlan (link_kind)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 15:17:46 -08:00
6328de59d2 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>
2018-12-13 15:17:23 -08:00
d54d014d9c nlmanager: use strerror to deal with kernel error
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 15:17:09 -08:00
5234020236 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>
2018-12-13 15:16:40 -08:00
2229ca6371 addons: bridge: add "None" check (string) for unsupported bridge attr on some systems
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
06dd888a28 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
```
2018-12-13 14:43:57 -08:00
a0b4ad9c9b addons: vxlan: modinfo: remove vxlan-port validval
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
05a596d020 addons: bridge: modinfo: bridge-portmcfl remove validrange attribute
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
fc0026de84 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>
2018-12-13 14:43:57 -08:00
0c4237d58d addons: bond: catch exception and log.info on modprobe failure
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
84ae193632 ifupdown2.conf: enable addon_scripts_support and disable addon_syntax_check
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
9d50518591 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>
2018-12-13 14:43:57 -08:00
629b46992d debian: changelog: update all entry to unstable distribution
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
2eecfaf3dd debian: changelog: 1.2.1: set RELEASED
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
2185a10865 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>
2018-12-13 14:43:57 -08:00
ebfc7e2952 debian: changelog: update 1.2.1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
3abe662118 debian: changelog: 1.2.1: update entry date
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
3fb83a7ab6 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>
2018-12-13 14:43:57 -08:00
cd890b06e4 addons: address: don't reset ip addrgen on dhcp intf
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
535b0c8d4b Fix gretunnels 2018-12-13 14:43:57 -08:00
3dcd868f84 debian: watch: removing watch file according to debian-watch-file-in-native-package (lintian warning)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
1b5c4ba96f debian: changelog: add l3_intf_arp_accept policy to 1.2.1 entry
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
8b57a467ca 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>
2018-12-13 14:43:57 -08:00
c3175b312b 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>
2018-12-13 14:43:57 -08:00
d665f4f10e adodns: bridge: bridge-[port]mcrouter enhance modinfo helper
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
0d6edae700 addons: vxlan: fix vxlan-port example type
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
b306a8b6e3 addons: address: up_ipv6_addrgen: add PERFMODE check
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
4d4aac88ec nlpacket:: add family string (AF_*) to debug dump
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
3479a0c3bb 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>
2018-12-13 14:43:57 -08:00
d00f527807 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>
2018-12-13 14:43:57 -08:00
3c572e6ac0 man: ifquery: fix conflicting documentation about ifquery -i flag
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
a220d2d128 addon: ethtool: link-speed: add 10 to valid values array
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
04f83b1adf debian: changelog: add link-fec changelog entry (release 1.2.1)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
c69c3081f3 README: update deb version (1.2.1) 2018-12-13 14:43:57 -08:00
d03e63b634 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>
2018-12-13 14:43:57 -08:00
24c625ee16 README: update dependency list: fakeroot, build-essential 2018-12-13 14:43:57 -08:00
31d31fed16 README: update build dependency list
build dependency line was missing 'devscripts'
2018-12-13 14:43:57 -08:00
6092d5450a 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>
2018-12-13 14:43:57 -08:00
a0ab870e46 debian: changelog: update changelog for release 1.2.1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
f944abda20 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>
2018-12-13 14:43:57 -08:00
6deeac331a 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>
2018-12-13 14:43:57 -08:00
80d56a078d 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>
2018-12-13 14:43:57 -08:00
ccb3fa7cdd addons: vlan: for ip link del use netlink rather than iproute2
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
5b30e16f58 addons: vlan: add vlan-raw-device add missing user config check
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
650dd90a6a addons: vlan: raw-device: check if cache value is valid before more checks
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
d4019ee902 LinkUtils: addrgen: move disable_ipv6 check before MTU check
if disable_ipv6 is on there's no need to check for the MTU

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
7114342b25 addons: vlan: error out when vlan-raw-device config change on existing vlan
kernel doesn't support vlan raw-device change on existing vlan, user needs to
manually ifdown/ifup the device

[13:45:06] root:~ # ifquery vlan42
auto vlan42
iface vlan42
      address 42.42.42.42/24
      vlan-id 42
      vlan-raw-device swp1

[13:45:07] root:~ # ifup -a
[13:45:09] root:~ # echo $?
0
[13:45:10] root:~ # ip link show vlan42
34: vlan42@swp1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 90:e2:ba:2c:b1:96 brd ff:ff:ff:ff:ff:ff
[13:45:13] root:~ # nano /etc/network/interfaces
[13:45:19] root:~ # ifquery vlan42
auto vlan42
iface vlan42
      address 42.42.42.42/24
      vlan-id 42
      vlan-raw-device swp2

[13:45:25] root:~ # ifreload -a
error: vlan42: cannot change vlan-raw-device from swp1 to swp2: operation not supported. Please delete the device with 'ifdown vlan42' and recreate it to apply the change.
[13:45:27] root:~ # echo $?
1
[13:45:30] root:~ #

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
8329d2b8af LinkUtils: check device MTU and /proc/../disable_ipv6 before setting ipv6-addrgen
The minimum IPv6 MTU (ipv6 stack should handle at minmum this size)
is 1280 bytes. If you set the MTU below that then you can't really
have ipv6 addrconf follows the MTU changes and if it sees change
below 1280 then it disables ipv6 on the iface

$ ifquery swp1
auto swp1
iface swp1
      mtu 420

$ ifreload -a
error: swp1: cmd '/bin/ip -force -batch - [link set dev swp1 down
link set dev swp1 addrgenmode eui64
link set dev swp1 up
]' failed: returned 1 (RTNETLINK answers: Address family not supported by protocol
Command failed -:2
)

Reviewed-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-12-13 14:43:57 -08:00
d5a6c42675 README: update build instruction to switch to maste-next branch
The building instruction didn't mention that users should checkout the master-next branch and build from it. This branch contains the lastest ifupdown2 version
2018-12-13 14:43:57 -08:00