Skip to content

Commit

Permalink
Merge pull request #890 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
#675 Fixed minor issues for proxy protocol v2 support
  • Loading branch information
UltraInstinct14 authored Nov 27, 2024
2 parents 9b6d66c + e5a8f7c commit 4a4edca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion loxilb-ebpf
4 changes: 4 additions & 0 deletions pkg/loxinet/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,10 @@ func (R *RuleH) AddLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, al
return RuleUnknownServiceErr, errors.New("malformed-service error")
}

if serv.ProxyProtocolV2 && serv.Proto != "tcp" {
return RuleUnknownServiceErr, errors.New("proxy-proto-v2 not tcp service error")
}

if serv.Proto == "tcp" {
ipProto = 6
} else if serv.Proto == "udp" {
Expand Down

0 comments on commit 4a4edca

Please sign in to comment.