Updating netlink package to 4b5dce31de6d42af5bb9811c6d265472199e0fec
to fix certain wierd netlink issues seen.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
| ... | ... |
@@ -28,7 +28,7 @@ clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058f |
| 28 | 28 |
clone git github.com/hashicorp/serf 7151adcef72687bf95f451a2e0ba15cb19412bf2 |
| 29 | 29 |
clone git github.com/docker/libkv 60c7c881345b3c67defc7f93a8297debf041d43c |
| 30 | 30 |
clone git github.com/vishvananda/netns 493029407eeb434d0c2d44e02ea072ff2488d322 |
| 31 |
-clone git github.com/vishvananda/netlink 329b40d4e308deb2abe80dbb1f74078e5ab13164 |
|
| 31 |
+clone git github.com/vishvananda/netlink 4b5dce31de6d42af5bb9811c6d265472199e0fec |
|
| 32 | 32 |
clone git github.com/BurntSushi/toml f706d00e3de6abe700c994cdd545a1a4915af060 |
| 33 | 33 |
clone git github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374 |
| 34 | 34 |
clone git github.com/coreos/go-etcd v2.0.0 |
| ... | ... |
@@ -73,10 +73,7 @@ func LinkSetMTU(link Link, mtu int) error {
|
| 73 | 73 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 74 | 74 |
|
| 75 | 75 |
msg := nl.NewIfInfomsg(syscall.AF_UNSPEC) |
| 76 |
- msg.Type = syscall.RTM_SETLINK |
|
| 77 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 78 | 76 |
msg.Index = int32(base.Index) |
| 79 |
- msg.Change = syscall.IFLA_MTU |
|
| 80 | 77 |
req.AddData(msg) |
| 81 | 78 |
|
| 82 | 79 |
b := make([]byte, 4) |
| ... | ... |
@@ -97,10 +94,7 @@ func LinkSetName(link Link, name string) error {
|
| 97 | 97 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 98 | 98 |
|
| 99 | 99 |
msg := nl.NewIfInfomsg(syscall.AF_UNSPEC) |
| 100 |
- msg.Type = syscall.RTM_SETLINK |
|
| 101 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 102 | 100 |
msg.Index = int32(base.Index) |
| 103 |
- msg.Change = syscall.IFLA_IFNAME |
|
| 104 | 101 |
req.AddData(msg) |
| 105 | 102 |
|
| 106 | 103 |
data := nl.NewRtAttr(syscall.IFLA_IFNAME, []byte(name)) |
| ... | ... |
@@ -118,10 +112,7 @@ func LinkSetHardwareAddr(link Link, hwaddr net.HardwareAddr) error {
|
| 118 | 118 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 119 | 119 |
|
| 120 | 120 |
msg := nl.NewIfInfomsg(syscall.AF_UNSPEC) |
| 121 |
- msg.Type = syscall.RTM_SETLINK |
|
| 122 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 123 | 121 |
msg.Index = int32(base.Index) |
| 124 |
- msg.Change = syscall.IFLA_ADDRESS |
|
| 125 | 122 |
req.AddData(msg) |
| 126 | 123 |
|
| 127 | 124 |
data := nl.NewRtAttr(syscall.IFLA_ADDRESS, []byte(hwaddr)) |
| ... | ... |
@@ -151,10 +142,7 @@ func LinkSetMasterByIndex(link Link, masterIndex int) error {
|
| 151 | 151 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 152 | 152 |
|
| 153 | 153 |
msg := nl.NewIfInfomsg(syscall.AF_UNSPEC) |
| 154 |
- msg.Type = syscall.RTM_SETLINK |
|
| 155 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 156 | 154 |
msg.Index = int32(base.Index) |
| 157 |
- msg.Change = syscall.IFLA_MASTER |
|
| 158 | 155 |
req.AddData(msg) |
| 159 | 156 |
|
| 160 | 157 |
b := make([]byte, 4) |
| ... | ... |
@@ -176,10 +164,7 @@ func LinkSetNsPid(link Link, nspid int) error {
|
| 176 | 176 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 177 | 177 |
|
| 178 | 178 |
msg := nl.NewIfInfomsg(syscall.AF_UNSPEC) |
| 179 |
- msg.Type = syscall.RTM_SETLINK |
|
| 180 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 181 | 179 |
msg.Index = int32(base.Index) |
| 182 |
- msg.Change = syscall.IFLA_NET_NS_PID |
|
| 183 | 180 |
req.AddData(msg) |
| 184 | 181 |
|
| 185 | 182 |
b := make([]byte, 4) |
| ... | ... |
@@ -201,10 +186,7 @@ func LinkSetNsFd(link Link, fd int) error {
|
| 201 | 201 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 202 | 202 |
|
| 203 | 203 |
msg := nl.NewIfInfomsg(syscall.AF_UNSPEC) |
| 204 |
- msg.Type = syscall.RTM_SETLINK |
|
| 205 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 206 | 204 |
msg.Index = int32(base.Index) |
| 207 |
- msg.Change = nl.IFLA_NET_NS_FD |
|
| 208 | 205 |
req.AddData(msg) |
| 209 | 206 |
|
| 210 | 207 |
b := make([]byte, 4) |
| ... | ... |
@@ -266,6 +248,10 @@ func addVxlanAttrs(vxlan *Vxlan, linkInfo *nl.RtAttr) {
|
| 266 | 266 |
nl.NewRtAttrChild(data, nl.IFLA_VXLAN_L2MISS, boolAttr(vxlan.L2miss)) |
| 267 | 267 |
nl.NewRtAttrChild(data, nl.IFLA_VXLAN_L3MISS, boolAttr(vxlan.L3miss)) |
| 268 | 268 |
|
| 269 |
+ if vxlan.GBP {
|
|
| 270 |
+ nl.NewRtAttrChild(data, nl.IFLA_VXLAN_GBP, boolAttr(vxlan.GBP)) |
|
| 271 |
+ } |
|
| 272 |
+ |
|
| 269 | 273 |
if vxlan.NoAge {
|
| 270 | 274 |
nl.NewRtAttrChild(data, nl.IFLA_VXLAN_AGEING, nl.Uint32Attr(0)) |
| 271 | 275 |
} else if vxlan.Age > 0 {
|
| ... | ... |
@@ -627,10 +613,7 @@ func setProtinfoAttr(link Link, mode bool, attr int) error {
|
| 627 | 627 |
req := nl.NewNetlinkRequest(syscall.RTM_SETLINK, syscall.NLM_F_ACK) |
| 628 | 628 |
|
| 629 | 629 |
msg := nl.NewIfInfomsg(syscall.AF_BRIDGE) |
| 630 |
- msg.Type = syscall.RTM_SETLINK |
|
| 631 |
- msg.Flags = syscall.NLM_F_REQUEST |
|
| 632 | 630 |
msg.Index = int32(base.Index) |
| 633 |
- msg.Change = syscall.IFLA_PROTINFO | syscall.NLA_F_NESTED |
|
| 634 | 631 |
req.AddData(msg) |
| 635 | 632 |
|
| 636 | 633 |
br := nl.NewRtAttr(syscall.IFLA_PROTINFO|syscall.NLA_F_NESTED, nil) |
| ... | ... |
@@ -683,6 +666,8 @@ func parseVxlanData(link Link, data []syscall.NetlinkRouteAttr) {
|
| 683 | 683 |
vxlan.L2miss = int8(datum.Value[0]) != 0 |
| 684 | 684 |
case nl.IFLA_VXLAN_L3MISS: |
| 685 | 685 |
vxlan.L3miss = int8(datum.Value[0]) != 0 |
| 686 |
+ case nl.IFLA_VXLAN_GBP: |
|
| 687 |
+ vxlan.GBP = int8(datum.Value[0]) != 0 |
|
| 686 | 688 |
case nl.IFLA_VXLAN_AGEING: |
| 687 | 689 |
vxlan.Age = int(native.Uint32(datum.Value[0:4])) |
| 688 | 690 |
vxlan.NoAge = vxlan.Age == 0 |
| ... | ... |
@@ -47,7 +47,15 @@ const ( |
| 47 | 47 |
IFLA_VXLAN_PORT |
| 48 | 48 |
IFLA_VXLAN_GROUP6 |
| 49 | 49 |
IFLA_VXLAN_LOCAL6 |
| 50 |
- IFLA_VXLAN_MAX = IFLA_VXLAN_LOCAL6 |
|
| 50 |
+ IFLA_VXLAN_UDP_CSUM |
|
| 51 |
+ IFLA_VXLAN_UDP_ZERO_CSUM6_TX |
|
| 52 |
+ IFLA_VXLAN_UDP_ZERO_CSUM6_RX |
|
| 53 |
+ IFLA_VXLAN_REMCSUM_TX |
|
| 54 |
+ IFLA_VXLAN_REMCSUM_RX |
|
| 55 |
+ IFLA_VXLAN_GBP |
|
| 56 |
+ IFLA_VXLAN_REMCSUM_NOPARTIAL |
|
| 57 |
+ IFLA_VXLAN_FLOWBASED |
|
| 58 |
+ IFLA_VXLAN_MAX = IFLA_VXLAN_FLOWBASED |
|
| 51 | 59 |
) |
| 52 | 60 |
|
| 53 | 61 |
const ( |