Skip to content

Commit 9550667

Browse files
committed
fix
Signed-off-by: clyi <clyi@alauda.io>
1 parent c2f190f commit 9550667

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/daemon/flow_rules_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import (
1515
const flowKindUnderlayService = "usvc"
1616

1717
func (c *Controller) AddOrUpdateUnderlaySubnetSvcLocalFlowCache(serviceIP string, port uint16, protocol, dstMac, underlayNic, bridgeName, subnetName string) error {
18-
inPort, err := c.getPortID(bridgeName, underlayNic)
18+
inPort, err := c.getPortID(underlayNic)
1919
if err != nil {
2020
return err
2121
}
2222

2323
patchPortName := fmt.Sprintf("patch-localnet.%s-to-br-int", subnetName)
24-
outPort, err := c.getPortID(bridgeName, patchPortName)
24+
outPort, err := c.getPortID(patchPortName)
2525
if err != nil {
2626
klog.V(5).Infof("patch-localnet port %s not found on bridge %s, skipping underlay service flow for %s:%d (subnet %s may not have pods on this node yet)", patchPortName, bridgeName, serviceIP, port, subnetName)
2727
return nil
@@ -79,7 +79,7 @@ func buildFlowKey(kind, ip string, port uint16, protocol, extra string) string {
7979
return fmt.Sprintf("%s-%s-%s-%d-%s", kind, ip, protocol, port, extra)
8080
}
8181

82-
func (c *Controller) getPortID(bridgeName, portName string) (int, error) {
82+
func (c *Controller) getPortID(portName string) (int, error) {
8383
ofportStr, err := ovs.Get("Interface", portName, "ofport", "", true)
8484
if err != nil {
8585
return 0, fmt.Errorf("failed to get ofport for interface %s: %w", portName, err)

0 commit comments

Comments
 (0)