mirror of
https://github.com/vishvananda/netlink
synced 2025-03-03 11:57:54 +00:00
Fix LinkAdd for sit tunnel on 3.10 kernel
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
This commit is contained in:
parent
8bead6f932
commit
a5d066db6e
@ -2035,7 +2035,11 @@ func addSittunAttrs(sittun *Sittun, linkInfo *nl.RtAttr) {
|
||||
nl.NewRtAttrChild(data, nl.IFLA_IPTUN_REMOTE, []byte(ip))
|
||||
}
|
||||
|
||||
nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TTL, nl.Uint8Attr(sittun.Ttl))
|
||||
if sittun.Ttl > 0 {
|
||||
// Would otherwise fail on 3.10 kernel
|
||||
nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TTL, nl.Uint8Attr(sittun.Ttl))
|
||||
}
|
||||
|
||||
nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TOS, nl.Uint8Attr(sittun.Tos))
|
||||
nl.NewRtAttrChild(data, nl.IFLA_IPTUN_PMTUDISC, nl.Uint8Attr(sittun.PMtuDisc))
|
||||
nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_TYPE, nl.Uint16Attr(sittun.EncapType))
|
||||
|
@ -444,6 +444,8 @@ func TestLinkAddDelVeth(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLinkAddDelBond(t *testing.T) {
|
||||
minKernelRequired(t, 3, 13)
|
||||
|
||||
tearDown := setUpNetlinkTest(t)
|
||||
defer tearDown()
|
||||
|
||||
|
@ -53,6 +53,8 @@ func dumpContainsProxy(dump []Neigh, p proxyEntry) bool {
|
||||
}
|
||||
|
||||
func TestNeighAddDelLLIPAddr(t *testing.T) {
|
||||
setUpNetlinkTestWithKModule(t, "ipip")
|
||||
|
||||
tearDown := setUpNetlinkTest(t)
|
||||
defer tearDown()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user