mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-09-29 20:11:06 +02:00
fix bug when adding ip rule for fwmark (#1178)
Co-authored-by: Kailun Shi <kailun.shi@bytedance.com>
This commit is contained in:
parent
55a0dd10a6
commit
bee2c2089f
@ -1907,7 +1907,7 @@ func routeVIPTrafficToDirector(fwmark string) error {
|
||||
if err != nil {
|
||||
return errors.New("Failed to verify if `ip rule` exists due to: " + err.Error())
|
||||
}
|
||||
if !strings.Contains(string(out), fwmark) {
|
||||
if !strings.Contains(string(out), fwmark+" ") {
|
||||
err = exec.Command("ip", "rule", "add", "prio", "32764", "fwmark", fwmark, "table",
|
||||
customDSRRouteTableID).Run()
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user