-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
There are some bugs in the implementation of gribigo when it comes to IP-in-IP encapsulation
Can't program successfully due to a scalar issue
[6:00] robjs@aardvark:openconfig/gribigo/gemini_compliance container-fix ✔ 22d ◒ ⍉
▶ go test -run TestGRIBI/Test_valid_ip_in_ip_configuration_-_Operation_1:_ip_in_ip_with_IPv4_encapsulate_header -v
=== RUN TestGRIBI
=== RUN TestGRIBI/Test_valid_ip_in_ip_configuration_-_Operation_1:_ip_in_ip_with_IPv4_encapsulate_header
gcompliance_test.go:71: starting await for new connection
E0201 06:00:22.070881 3590150 server.go:940] returning failed to client because the RIB declared it failed, ID: 1, Type: id: 1
network_instance: "default"
op: ADD
next_hop: {
index: 1
next_hop: {
encapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4
ip_address: {
value: "10.0.0.1"
}
ip_in_ip: {
dst_ip: {
value: "192.168.1.1"
}
src_ip: {
value: "172.16.0.1"
}
}
}
}
election_id: {
low: 1
}
, Error: invalid NextHop, cannot convert field /afts/next-hops/next-hop[index=1]/state/encapsulate-header to scalar, <nil>
gcompliance_test.go:89: Checking operation 1: ADD
gcompliance_test.go:90: results are: [<1738389620778612837 (0 nsec): SessionParameterResult: OK ()> <1738389620778612837 (0 nsec): ElectionID: 1> <1738389620778612837 (0 nsec): AFTOperation { ID: 1, Details: <Type: Add NH Index: 1>, Status: FAILED } With Server Error: invalid NextHop, cannot convert field /afts/next-hops/next-hop[index=1]/state/encapsulate-header to scalar, <nil>>]
gcompliance_test.go:100: results did not contain a result of value <0 (0 nsec): AFTOperation { ID: 1, Details: <nil>, Status: RIB_PROGRAMMED }>
got:
<1738389620778612837 (0 nsec): SessionParameterResult: OK ()>
<1738389620778612837 (0 nsec): ElectionID: 1>
<1738389620778612837 (0 nsec): AFTOperation { ID: 1, Details: <Type: Add NH Index: 1>, Status: FAILED } With Server Error: invalid NextHop, cannot convert field /afts/next-hops/next-hop[index=1]/state/encapsulate-header to scalar, <nil>>
I0201 06:00:22.171985 3590150 lemming.go:359] Stopping server
I0201 06:00:22.172067 3590150 lemming.go:410] P4RT server stopped: []
I0201 06:00:22.172076 3590150 lemming.go:410] gNMI/gNOI/gNSI server stopped: []
I0201 06:00:22.172079 3590150 lemming.go:410] gRIBI server stopped: []
--- FAIL: TestGRIBI (1.11s)
--- FAIL: TestGRIBI/Test_valid_ip_in_ip_configuration_-_Operation_1:_ip_in_ip_with_IPv4_encapsulate_header (0.21s)
FAIL
exit status 1
FAIL github.com/openconfig/gribigo/gemini_compliance 1.546s
This causes successful programming to fail when the encapsulate_header field is specified to something non-nil.
Not checking whether encapsulation header is specified before programming IP-in-IP
[5:57] robjs@aardvark:openconfig/gribigo/gemini_compliance container-fix ✔ 22d ◒ ⍉
▶ go test -run "TestGRIBI/Test_invalid_ip_in_ip_configuration_-_Operation_7:_ip_in_ip_cannot_be_specified_without_an_encapsulate_header" -v
=== RUN TestGRIBI
=== RUN TestGRIBI/Test_invalid_ip_in_ip_configuration_-_Operation_7:_ip_in_ip_cannot_be_specified_without_an_encapsulate_header
gcompliance_test.go:71: starting await for new connection
gcompliance_test.go:89: Checking operation 7: ADD
gcompliance_test.go:90: results are: [<1738389429649738934 (0 nsec): SessionParameterResult: OK ()> <1738389429649738934 (0 nsec): ElectionID: 1> <1738389429649738934 (0 nsec): AFTOperation { ID: 7, Details: <Type: Add NH Index: 7>, Status: RIB_PROGRAMMED }>]
gcompliance_test.go:102: results did not contain a result of value <0 (0 nsec): AFTOperation { ID: 7, Details: <nil>, Status: FAILED }>
got:
<1738389429649738934 (0 nsec): SessionParameterResult: OK ()>
<1738389429649738934 (0 nsec): ElectionID: 1>
<1738389429649738934 (0 nsec): AFTOperation { ID: 7, Details: <Type: Add NH Index: 7>, Status: RIB_PROGRAMMED }>
I0201 05:57:11.042683 3587834 lemming.go:359] Stopping server
I0201 05:57:11.042761 3587834 lemming.go:410] P4RT server stopped: []
I0201 05:57:11.042769 3587834 lemming.go:410] gRIBI server stopped: []
I0201 05:57:11.042784 3587834 lemming.go:410] gNMI/gNOI/gNSI server stopped: []
--- FAIL: TestGRIBI (1.12s)
--- FAIL: TestGRIBI/Test_invalid_ip_in_ip_configuration_-_Operation_7:_ip_in_ip_cannot_be_specified_without_an_encapsulate_header (0.21s)
FAIL
exit status 1
FAIL github.com/openconfig/gribigo/gemini_compliance 1.546s
Metadata
Metadata
Assignees
Labels
No labels