Skip to content

Commit 22b419b

Browse files
committed
pass in protocol for ofproto/trace match flow
1 parent b563528 commit 22b419b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ovs/app.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ type AppService struct {
2626
// ProtoTrace runs ovs-appctl ofproto/trace on the given bridge and match flow
2727
// and returns a *ProtoTrace. Also returns err if there is any error parsing the
2828
// output from ovs-appctl ofproto/trace.
29-
func (a *AppService) ProtoTrace(bridge string, matches []Match) (*ProtoTrace, error) {
29+
func (a *AppService) ProtoTrace(bridge string, protocol Protocol, matches []Match) (*ProtoTrace, error) {
3030
matchFlows := []string{}
31+
if protocol != "" {
32+
matchFlows = append(matchFlows, string(protocol))
33+
}
34+
3135
for _, match := range matches {
3236
matchFlow, err := match.MarshalText()
3337
if err != nil {

0 commit comments

Comments
 (0)