Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6058ab51
Unverified
Commit
6058ab51
authored
Oct 21, 2021
by
Manuel Buil
Committed by
GitHub
Oct 21, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4258 from manuelbuil/update_flannel
Update to the newest flannel (v0.15.1)
parents
b5b7033a
6e410fad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
7 deletions
+49
-7
go.mod
go.mod
+1
-1
go.sum
go.sum
+2
-2
device.go
vendor/github.com/flannel-io/flannel/backend/vxlan/device.go
+9
-3
mac.go
vendor/github.com/flannel-io/flannel/pkg/mac/mac.go
+35
-0
modules.txt
vendor/modules.txt
+2
-1
No files found.
go.mod
View file @
6058ab51
...
@@ -83,7 +83,7 @@ require (
...
@@ -83,7 +83,7 @@ require (
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
github.com/docker/docker v20.10.7+incompatible
github.com/docker/docker v20.10.7+incompatible
github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83
github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83
github.com/flannel-io/flannel v0.1
4.1-0.20210827074410-fca1560c91cc
github.com/flannel-io/flannel v0.1
5.1
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-sql-driver/mysql v1.6.0
github.com/go-sql-driver/mysql v1.6.0
github.com/golangplus/testing v1.0.0 // indirect
github.com/golangplus/testing v1.0.0 // indirect
...
...
go.sum
View file @
6058ab51
...
@@ -283,8 +283,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
...
@@ -283,8 +283,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flannel-io/flannel v0.1
4.1-0.20210827074410-fca1560c91cc h1:t/L/tIYcAayH7XICVYtAscY/PXaJDKXsKheAMCtiKS0
=
github.com/flannel-io/flannel v0.1
5.1 h1:9v5/fapXePDnXVsFBVnji4IeLoXcO81bO8nEbQioYVQ
=
github.com/flannel-io/flannel v0.1
4.1-0.20210827074410-fca1560c91cc
/go.mod h1:fIcQpjXVBEE22oxqfZN0cXN0ZInsMDqTF5YoeGo6DgY=
github.com/flannel-io/flannel v0.1
5.1
/go.mod h1:fIcQpjXVBEE22oxqfZN0cXN0ZInsMDqTF5YoeGo6DgY=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
...
...
vendor/github.com/flannel-io/flannel/backend/vxlan/device.go
View file @
6058ab51
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// See the License for the specific language governing permissions and
// limitations under the License.
// limitations under the License.
// +build !windows
package
vxlan
package
vxlan
...
@@ -24,6 +23,7 @@ import (
...
@@ -24,6 +23,7 @@ import (
"github.com/containernetworking/plugins/pkg/utils/sysctl"
"github.com/containernetworking/plugins/pkg/utils/sysctl"
"github.com/flannel-io/flannel/pkg/ip"
"github.com/flannel-io/flannel/pkg/ip"
"github.com/flannel-io/flannel/pkg/mac"
"github.com/vishvananda/netlink"
"github.com/vishvananda/netlink"
log
"k8s.io/klog"
log
"k8s.io/klog"
)
)
...
@@ -44,9 +44,15 @@ type vxlanDevice struct {
...
@@ -44,9 +44,15 @@ type vxlanDevice struct {
}
}
func
newVXLANDevice
(
devAttrs
*
vxlanDeviceAttrs
)
(
*
vxlanDevice
,
error
)
{
func
newVXLANDevice
(
devAttrs
*
vxlanDeviceAttrs
)
(
*
vxlanDevice
,
error
)
{
hardwareAddr
,
err
:=
mac
.
NewHardwareAddr
()
if
err
!=
nil
{
return
nil
,
err
}
link
:=
&
netlink
.
Vxlan
{
link
:=
&
netlink
.
Vxlan
{
LinkAttrs
:
netlink
.
LinkAttrs
{
LinkAttrs
:
netlink
.
LinkAttrs
{
Name
:
devAttrs
.
name
,
Name
:
devAttrs
.
name
,
HardwareAddr
:
hardwareAddr
,
},
},
VxlanId
:
int
(
devAttrs
.
vni
),
VxlanId
:
int
(
devAttrs
.
vni
),
VtepDevIndex
:
devAttrs
.
vtepIndex
,
VtepDevIndex
:
devAttrs
.
vtepIndex
,
...
@@ -56,7 +62,7 @@ func newVXLANDevice(devAttrs *vxlanDeviceAttrs) (*vxlanDevice, error) {
...
@@ -56,7 +62,7 @@ func newVXLANDevice(devAttrs *vxlanDeviceAttrs) (*vxlanDevice, error) {
GBP
:
devAttrs
.
gbp
,
GBP
:
devAttrs
.
gbp
,
}
}
link
,
err
:
=
ensureLink
(
link
)
link
,
err
=
ensureLink
(
link
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
vendor/github.com/flannel-io/flannel/pkg/mac/mac.go
0 → 100644
View file @
6058ab51
// Copyright 2021 flannel authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package
mac
import
(
"crypto/rand"
"fmt"
"net"
)
// NewHardwareAddr generates a new random hardware (MAC) address, local and
// unicast.
func
NewHardwareAddr
()
(
net
.
HardwareAddr
,
error
)
{
hardwareAddr
:=
make
(
net
.
HardwareAddr
,
6
)
if
_
,
err
:=
rand
.
Read
(
hardwareAddr
);
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"could not generate random MAC address: %w"
,
err
)
}
// Ensure that address is locally administered and unicast.
hardwareAddr
[
0
]
=
(
hardwareAddr
[
0
]
&
0xfe
)
|
0x02
return
hardwareAddr
,
nil
}
vendor/modules.txt
View file @
6058ab51
...
@@ -524,7 +524,7 @@ github.com/exponent-io/jsonpath
...
@@ -524,7 +524,7 @@ github.com/exponent-io/jsonpath
github.com/fatih/camelcase
github.com/fatih/camelcase
# github.com/felixge/httpsnoop v1.0.1
# github.com/felixge/httpsnoop v1.0.1
github.com/felixge/httpsnoop
github.com/felixge/httpsnoop
# github.com/flannel-io/flannel v0.1
4.1-0.20210827074410-fca1560c91cc
# github.com/flannel-io/flannel v0.1
5.1
## explicit
## explicit
github.com/flannel-io/flannel/backend
github.com/flannel-io/flannel/backend
github.com/flannel-io/flannel/backend/extension
github.com/flannel-io/flannel/backend/extension
...
@@ -533,6 +533,7 @@ github.com/flannel-io/flannel/backend/ipsec
...
@@ -533,6 +533,7 @@ github.com/flannel-io/flannel/backend/ipsec
github.com/flannel-io/flannel/backend/vxlan
github.com/flannel-io/flannel/backend/vxlan
github.com/flannel-io/flannel/network
github.com/flannel-io/flannel/network
github.com/flannel-io/flannel/pkg/ip
github.com/flannel-io/flannel/pkg/ip
github.com/flannel-io/flannel/pkg/mac
github.com/flannel-io/flannel/pkg/powershell
github.com/flannel-io/flannel/pkg/powershell
github.com/flannel-io/flannel/pkg/routing
github.com/flannel-io/flannel/pkg/routing
github.com/flannel-io/flannel/subnet
github.com/flannel-io/flannel/subnet
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment