Skip to content

Commit

Permalink
service-proxy:Fixed regression issue with flannel
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Dec 3, 2024
1 parent 5a430c8 commit 0daf1e6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions api/loxinlp/nlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,14 @@ func AddNeigh(neigh nlp.Neigh, link nlp.Link) int {
return 0
}
brId, _ = strconv.Atoi(strings.Join(re.FindAllString(brLink.Attrs().Name, -1), " "))
// Dirty hack to support docker bridge
if brId == 0 {
if brLink.Attrs().Name == "docker0" {
brId = 4090
} else if brLink.Attrs().Name == "cni0" {
brId = 4091
}
}
}

if vxlan, ok := link.(*nlp.Vxlan); ok {
Expand Down Expand Up @@ -1157,6 +1165,14 @@ func DelNeigh(neigh nlp.Neigh, link nlp.Link) int {
return 0
}
brId, _ = strconv.Atoi(strings.Join(re.FindAllString(brLink.Attrs().Name, -1), " "))
// Dirty hack to support docker bridge
if brId == 0 {
if brLink.Attrs().Name == "docker0" {
brId = 4090
} else if brLink.Attrs().Name == "cni0" {
brId = 4091
}
}
}

if vxlan, ok := link.(*nlp.Vxlan); ok {
Expand Down

0 comments on commit 0daf1e6

Please sign in to comment.