Skip to content

Commit 256f667

Browse files
committed
fix patch error
Signed-off-by: clyi <clyi@alauda.io>
1 parent 4309d76 commit 256f667

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pkg/daemon/flow_rules_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func buildFlowKey(kind, ip string, port uint16, protocol, extra string) string {
8080
}
8181

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

pkg/ovs/ovs-vsctl.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func ovsClear(table, record string, columns ...string) error {
158158
return err
159159
}
160160

161-
func ovsGet(table, record, column, key string) (string, error) {
161+
func OvsGet(table, record, column, key string) (string, error) {
162162
var columnVal string
163163
if key == "" {
164164
columnVal = column
@@ -169,6 +169,10 @@ func ovsGet(table, record, column, key string) (string, error) {
169169
return Exec(args...)
170170
}
171171

172+
func ovsGet(table, record, column, key string) (string, error) {
173+
return OvsGet(table, record, column, key)
174+
}
175+
172176
// Bridges returns bridges created by Kube-OVN
173177
func Bridges() ([]string, error) {
174178
return ovsFind("bridge", "name", "external-ids:vendor="+util.CniTypeName)

0 commit comments

Comments
 (0)