Provide method to query for specific policy (#115)

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch
2016-05-09 16:52:35 -07:00
committed by Vish Ishaya
parent a123807666
commit cb0b035c41
5 changed files with 162 additions and 57 deletions

View File

@@ -69,6 +69,12 @@ func TestXfrmStateAddDel(t *testing.T) {
}
func compareStates(a, b *XfrmState) bool {
if a == b {
return true
}
if a == nil || b == nil {
return false
}
return a.Src.Equal(b.Src) && a.Dst.Equal(b.Dst) &&
a.Mode == b.Mode && a.Spi == b.Spi && a.Proto == b.Proto &&
a.Auth.Name == b.Auth.Name && bytes.Equal(a.Auth.Key, b.Auth.Key) &&