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

PR - Fix for ipsec vti cicd not working #467

Merged
merged 1 commit into from
Dec 22, 2023
Merged
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
13 changes: 13 additions & 0 deletions api/loxinlp/nlp.go
Original file line number Diff line number Diff line change
@@ -825,6 +825,19 @@ func ModLink(link nlp.Link, add bool) int {
tunDst = iptun.Remote
tunSrc = iptun.Local
tk.LogIt(tk.LogInfo, "[NLP] IPTun %v (%s:%s), %s\n", name, tunSrc.String(), tunDst.String(), mod)
} else if vtiTun, ok := link.(*nlp.Vti); ok {
pType = cmn.PortVti
if vtiTun.Remote == nil || vtiTun.Local == nil {
return -1
}

if vtiTun.Remote.IsUnspecified() || vtiTun.Local.IsUnspecified() {
return -1
}
tunId = int(vtiTun.OKey)
tunDst = vtiTun.Remote
tunSrc = vtiTun.Local
tk.LogIt(tk.LogInfo, "[NLP] VTITun %v (%s:%s), %s\n", name, tunSrc.String(), tunDst.String(), mod)
} else if master != "" {
pType = cmn.PortBondSif
}
2 changes: 1 addition & 1 deletion loxinet/neighbor.go
Original file line number Diff line number Diff line change
@@ -244,7 +244,7 @@ func (n *NeighH) NeighRecursiveResolve(ne *Neigh) bool {

if ne.Resolved == true {

if port.IsL3TunPort() {
if port.IsIPinIPTunPort() {
err, pDstNet, tDat := n.Zone.Rt.Trie4.FindTrie(port.HInfo.TunDst.String())
if err == 0 && pDstNet != nil {
switch rtn := tDat.(type) {
8 changes: 8 additions & 0 deletions loxinet/port.go
Original file line number Diff line number Diff line change
@@ -1068,3 +1068,11 @@ func (p *Port) IsL3TunPort() bool {
}
return false
}

// IsIPinIPTunPort - check if the port is of IPinIPTun type
func (p *Port) IsIPinIPTunPort() bool {
if p.SInfo.PortType&(cmn.PortIPTun) != 0 {
return true
}
return false
}