Skip to content

Commit

Permalink
hypervisor/metadatad: copy bridge MTU when creating veth* devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgooch committed Oct 11, 2024
1 parent aa35af3 commit 078b39e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hypervisor/metadatad/daemons.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ func createInterface(bridge net.Interface, threadId int,
if _, err := net.InterfaceByName(localName); err == nil {
exec.Command("ip", "link", "delete", localName).Run()
}
cmd := exec.Command("ip", "link", "add", localName, "type", "veth",
cmd := exec.Command("ip", "link", "add", localName,
"mtu", strconv.Itoa(bridge.MTU),
"type", "veth",
"peer", "name", remoteName)
if output, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("error creating veth for bridge: %s: %s: %s",
Expand Down

0 comments on commit 078b39e

Please sign in to comment.