Bug 2107647

Summary: NetworkManager modifies vlan_filtering on unmanaged bridge if associated with managed bond
Product: Red Hat Enterprise Linux 9 Reporter: Eric Garver <egarver>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Matej Berezny <mberezny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.1CC: bgalvani, lrintel, rkhan, sfaye, sukulkar, till, vbenes, wenliang
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.39.11-1.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:17:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproduce with "sh reproducer.sh" none

Description Eric Garver 2022-07-15 15:10:55 UTC
Created attachment 1897421 [details]
Reproduce with "sh reproducer.sh"

If you create a bond via nmcli and set master to a bridge device that was create out-of-band of NM, then NM will reset/modify vlan_filtering on the bridge.

See attached reproducer and level=TRACE log.
Run reproducer: `sh reproducer.sh`

--->8---

# ip link add test-br0 type bridge vlan_filtering 1
[..]
# nmcli connection add con-name test-bond0 type bond ifname test-bond0 master test-br0 bond.options "mode=2,xmit_hash_policy=vlan+srcmac" slave-type bridge
# nmcli connection up test-bond0
[..]
# ip -d link show test-br0
242: test-br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 42:b0:c3:16:e5:f4 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 
    bridge forward_delay 1500 hello_time 200 max_age 2000 ageing_time 30000 stp_state 0 priority 32768 vlan_filtering 0 vlan_protocol 802.1Q bridge_id 8000.42:b0:c3:16:e5:f4 designated_root 8000.42:b0:c3:16:e5:f4 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer    0.00 tcn_timer    0.00 topology_change_timer    0.00 gc_timer  289.73 vlan_default_pvid 1 vlan_stats_enabled 0 vlan_stats_per_port 0 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_vlan_snooping 0 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 16 mcast_hash_max 4096 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3125 mcast_stats_enabled 0 mcast_igmp_version 2 mcast_mld_version 1 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

Comment 4 Beniamino Galvani 2022-07-19 14:25:47 UTC
I think a check on the device state (nm_device_sys_iface_state_is_external_or_assume()) is missing in NMDeviceBridge->act_stage1_prepare() before changing vlan-filtering parameters.

Comment 9 errata-xmlrpc 2023-05-09 08:17:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2485