Skip to content

Commit fc1d42f

Browse files
cmainasurunc-bot[bot]
authored andcommitted
fix(cloud-hypervisor): DO not set mtu option for network device
Do not use the MTU option in network device for cloud-hypervisor because it will try to set this MTU value in the tap device and this operation requires CAP_NET_ADMIN. Cloud-hypervisor will still advertise the correct MTU value to the guest, since it reads it from the TAP device. PR: #1054 Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
1 parent ef1dc96 commit fc1d42f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎pkg/unikontainers/hypervisors/cloud_hypervisor.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (ch *CloudHypervisor) BuildExecCmd(args types.ExecArgs, ukernel types.Unike
115115
netCli := ukernel.MonitorNetCli(args.Net.TapDev, args.Net.MAC)
116116
if len(netCli) == 0 {
117117
// Default network configuration for Cloud Hypervisor
118-
netArg := fmt.Sprintf("tap=%s,mac=%s,mtu=%d", args.Net.TapDev, args.Net.MAC, args.Net.MTU)
118+
netArg := fmt.Sprintf("tap=%s,mac=%s", args.Net.TapDev, args.Net.MAC)
119119
exArgs = append(exArgs, "--net", netArg)
120120
} else {
121121
exArgs = append(exArgs, netCli...)

0 commit comments

Comments
 (0)