Skip to content

Commit

Permalink
vlan: register proper mtu value
Browse files Browse the repository at this point in the history
Upon a subinterface creation, the MTU is set to '0' after a reconfig.

grout# show interface name vlan210
name: vlan210
id: 3
flags: up
vrf: 0
mtu: 0
type: vlan
parent: dpdk-p1
vlan_id: 210

Read the parent interface MTU to fill in the proper data.

Signed-off-by: Christophe Fontaine <[email protected]>
  • Loading branch information
christophefontaine committed Jan 30, 2025
1 parent f876490 commit 65042b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/infra/control/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int iface_vlan_reconfig(
if (set_attrs & GR_IFACE_SET_FLAGS)
iface->flags = flags;
if (set_attrs & GR_IFACE_SET_MTU)
iface->mtu = mtu;
iface->mtu = mtu ? mtu : iface_from_id(cur->parent_id)->mtu;
if (set_attrs & GR_IFACE_SET_VRF)
iface->vrf_id = vrf_id;

Expand Down

0 comments on commit 65042b0

Please sign in to comment.