Skip to content

Commit

Permalink
loxilb-io#675 Fixed minor issues for proxy protocol v2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Nov 27, 2024
1 parent 9b6d66c commit e5a8f7c
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 e5a8f7c

Please sign in to comment.