Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VERSION to v0.15.1 #63

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.15.0
v0.15.1
14 changes: 6 additions & 8 deletions openflow15/match_test.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
package openflow15_test
package openflow15

import (
"bytes"
"fmt"
"net"
"testing"

"antrea.io/libOpenflow/openflow15"
)

func TestMatchEthAddresses(t *testing.T) {
ethSrcAddress, _ := net.ParseMAC("aa:aa:aa:aa:aa:aa")
ethDstAddress, _ := net.ParseMAC("ff:ff:ff:ff:ff:ff")

ofMatch := openflow15.NewMatch()
ofMatch := NewMatch()
{
macSrcField := openflow15.NewEthSrcField(ethSrcAddress, nil)
macSrcField := NewEthSrcField(ethSrcAddress, nil)
ofMatch.AddField(*macSrcField)

macDstField := openflow15.NewEthDstField(ethDstAddress, nil)
macDstField := NewEthDstField(ethDstAddress, nil)
ofMatch.AddField(*macDstField)
}

Expand All @@ -27,15 +25,15 @@ func TestMatchEthAddresses(t *testing.T) {
}
}

func checkMatchSerializationConsistency(ofMatch *openflow15.Match) error {
func checkMatchSerializationConsistency(ofMatch *Match) error {
// Serialize the original match
ofMatchRaw, err := ofMatch.MarshalBinary()
if err != nil {
return fmt.Errorf("failed to marshal match: %w", err)
}

// Deserialize into a new match object
ofMatchRecovered := openflow15.NewMatch()
ofMatchRecovered := NewMatch()
if err := ofMatchRecovered.UnmarshalBinary(ofMatchRaw); err != nil {
return fmt.Errorf("failed to unmarshal match: %w", err)
}
Expand Down
Loading