Skip to content

Commit

Permalink
Make containers inherit their MTU from the bridge.
Browse files Browse the repository at this point in the history
  • Loading branch information
clinta committed Mar 7, 2016
1 parent a479894 commit dc8931d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Name of the bridge interface

#### bridgeMTU

MTU of the bridge interface
MTU of the bridge interface. Container interfaces inherit their MTU from the bridge interface.

#### bridgeHardwareAddr

Expand Down
30 changes: 22 additions & 8 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import:
version: v0.9.0
- package: github.com/codegangsta/cli
- package: github.com/docker/go-plugins-helpers
version: e121e40d9473dd84b97bbccd835192dce7096f30
version: 94650054f38b80ab066a72e945a9e7553c292ff1
subpackages:
- network
- package: github.com/samalba/dockerclient
Expand Down
3 changes: 2 additions & 1 deletion vxlan/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ func (d *Driver) Join(r *network.JoinRequest) (*network.JoinResponse, error) {
}
// create and attach local name to the bridge
veth := &netlink.Veth{
LinkAttrs: netlink.LinkAttrs{Name: "veth_" + r.EndpointID[:5]},
LinkAttrs: netlink.LinkAttrs{Name: "veth_" + r.EndpointID[:5],
MTU: links.Bridge.LinkAttrs.MTU },
PeerName: "ethc" + r.EndpointID[:5],
}
if err := netlink.LinkAdd(veth); err != nil {
Expand Down

0 comments on commit dc8931d

Please sign in to comment.