Skip to content

Destination IP attribute appears to be being sent as string not bytes for TCP traffic #3980

@douglas-reid

Description

@douglas-reid

From manual testing:

2018-03-05T22:43:27.004209Z	debug	Creating bag with attributes: &CompressedAttributes{Words:[connection.mtls netcat-srv.dashboard-test-bb2e038d35294053a3a836.svc.cluster.local 4ec61021-71b6-4dbe-9bd2-b4823d624206-21 10.40.0.65 kubernetes://netcat-srv-6c7df54b57-7svgp.dashboard-test-bb2e038d35294053a3a836],Strings:map[int32]int32{125: -3,131: 124,150: -4,152: -2,154: -5,},Int64S:map[int32]int64{1: 33382,},Doubles:map[int32]float64{},Bools:map[int32]bool{-1: false,},Timestamps:map[int32]time.Time{133: 2018-03-05 22:43:27.002173326 +0000 UTC,},Durations:map[int32]time.Duration{},Bytes:map[int32][]byte{0: [10 40 2 83],},StringMaps:map[int32]StringMap{},}
2018-03-05T22:43:27.004293Z	debug	Dispatching Preprocess Check
panic: interface conversion: interface {} is string, not net.IP

goroutine 45478 [running]:
istio.io/istio/mixer/template.(*builder_adapter_template_kubernetes_Template).build(0xc420cd7140, 0x186f800, 0xc4204ca770, 0xc420b2d501, 0x0, 0x0, 0x200, 0x1532e60)
	/home/bootstrap/go/src/istio.io/istio/mixer/template/template.gen.go:3551 +0x556

This is for a request from a Pod with IP 10.40.2.83 to a Pod with IP 10.40.0.65.

As you can see in the logs above, the destination IP address appears in the Words for the attribute bag. This leads to it being treated as a string.

Manually, doing the mapping seems to imply "destination.ip" is being set to "10.40.0.65" (based on 154:-5).

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions