Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support VXLAN GBP #455

Merged
merged 2 commits into from
Jul 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ This is the only mandatory key.
* `Type` (string): `vxlan`
* `VNI` (number): VXLAN Identifier (VNI) to be used. Defaults to 1.
* `Port` (number): UDP port to use for sending encapsulated packets. Defaults to kernel default, currently 8472.
* `GBP` (boolean): Enable [VXLAN Group Based Policy](https://github.com/torvalds/linux/commit/3511494ce2f3d3b77544c79b87511a4ddb61dc89). Defaults to false.

* host-gw: create IP routes to subnets via remote machine IPs.
Note that this requires direct layer2 connectivity between hosts running flannel.
Expand Down
2 changes: 2 additions & 0 deletions backend/vxlan/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type vxlanDeviceAttrs struct {
vtepIndex int
vtepAddr net.IP
vtepPort int
gbp bool
}

type vxlanDevice struct {
Expand Down Expand Up @@ -61,6 +62,7 @@ func newVXLANDevice(devAttrs *vxlanDeviceAttrs) (*vxlanDevice, error) {
SrcAddr: devAttrs.vtepAddr,
Port: devAttrs.vtepPort,
Learning: false,
GBP: devAttrs.gbp,
}

link, err := ensureLink(link)
Expand Down
2 changes: 2 additions & 0 deletions backend/vxlan/vxlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (be *VXLANBackend) RegisterNetwork(ctx context.Context, network string, con
cfg := struct {
VNI int
Port int
GBP bool
}{
VNI: defaultVNI,
}
Expand All @@ -86,6 +87,7 @@ func (be *VXLANBackend) RegisterNetwork(ctx context.Context, network string, con
vtepIndex: be.extIface.Iface.Index,
vtepAddr: be.extIface.IfaceAddr,
vtepPort: cfg.Port,
gbp: cfg.GBP,
}

dev, err := newVXLANDevice(&devAttrs)
Expand Down
6 changes: 3 additions & 3 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 @@ -48,7 +48,7 @@ import:
- package: github.com/vaughan0/go-ini
version: a98ad7ee00ec53921f08832bc06ecf7fd600e6a1
- package: github.com/vishvananda/netlink
version: 293adec04146bfb07bf34f75921ebc9c1ee2cd74
version: e73bad418fd727ed3a02830b1af1ad0283a1de6c
subpackages:
- nl
- package: golang.org/x/net
Expand Down
13 changes: 12 additions & 1 deletion vendor/github.com/vishvananda/netlink/addr_linux.go

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

4 changes: 2 additions & 2 deletions vendor/github.com/vishvananda/netlink/filter_linux.go

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

70 changes: 35 additions & 35 deletions vendor/github.com/vishvananda/netlink/handle_linux.go

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

13 changes: 10 additions & 3 deletions vendor/github.com/vishvananda/netlink/handle_test.go

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

17 changes: 14 additions & 3 deletions vendor/github.com/vishvananda/netlink/link_linux.go

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

81 changes: 81 additions & 0 deletions vendor/github.com/vishvananda/netlink/link_test.go

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

Loading