Skip to content

Commit

Permalink
Merge pull request #467 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
PR - Fix for ipsec vti cicd not working
  • Loading branch information
UltraInstinct14 authored Dec 22, 2023
2 parents 31cc596 + 0642ad4 commit 8457330
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
13 changes: 13 additions & 0 deletions api/loxinlp/nlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion loxinet/neighbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 8 additions & 0 deletions loxinet/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 8457330

Please sign in to comment.