Skip to content

Commit 400e9a7

Browse files
Disable IP options by default (#1001)
1 parent 816e7b5 commit 400e9a7

File tree

5 files changed

+14
-31
lines changed

5 files changed

+14
-31
lines changed

.github/workflows/workflow_integration_tests_vm.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,14 @@ jobs:
3535
- name: build matrix
3636
id: build-matrix
3737
env:
38-
# 6 partitions, one for each of:
38+
# 5 partitions, one for each of:
3939
# 1. TestMultiProcess
4040
# 2. TestMultiProcessAppCP
41-
# 3. TestMultiProcessAppCPNoIP
41+
# 3. TestMultiProcessAppCPHeadersOnly
4242
# 4. TestMultiProcessAppCPTCPOnly
43-
# 5. TestMultiProcessAppCPHeadersAndTCP
44-
# 6. TestMultiProcessAppCPIPOnly
43+
# 5. TestMultiProcessAppCPIPOnly
4544

46-
PARTITIONS: 6
45+
PARTITIONS: 5
4746
TEST_TAGS: integration
4847
run: |
4948
echo -n "matrix=" >> $GITHUB_OUTPUT

internal/test/integration/multiprocess_test.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestMultiProcessAppCP(t *testing.T) {
128128
require.NoError(t, compose.Close())
129129
}
130130

131-
func TestMultiProcessAppCPNoIP(t *testing.T) {
131+
func TestMultiProcessAppCPHeadersOnly(t *testing.T) {
132132
compose, err := docker.ComposeSuite("docker-compose-multiexec-host.yml", path.Join(pathOutput, "test-suite-multiexec-app-cp-no-ip.log"))
133133
require.NoError(t, err)
134134

@@ -161,22 +161,6 @@ func TestMultiProcessAppCPTCPOnly(t *testing.T) {
161161
require.NoError(t, compose.Close())
162162
}
163163

164-
func TestMultiProcessAppCPHeadersAndTCP(t *testing.T) {
165-
compose, err := docker.ComposeSuite("docker-compose-multiexec-host.yml", path.Join(pathOutput, "test-suite-multiexec-app-cp-headers-tcp.log"))
166-
require.NoError(t, err)
167-
168-
// Test combined headers and TCP context propagation
169-
compose.Env = append(compose.Env, `OTEL_EBPF_BPF_DISABLE_BLACK_BOX_CP=1`, `OTEL_EBPF_BPF_CONTEXT_PROPAGATION=headers,tcp`, `OTEL_EBPF_BPF_TRACK_REQUEST_HEADERS=1`)
170-
171-
require.NoError(t, compose.Up())
172-
173-
t.Run("Nested traces with headers and TCP propagation", func(t *testing.T) {
174-
testNestedHTTPTracesKProbes(t)
175-
})
176-
177-
require.NoError(t, compose.Close())
178-
}
179-
180164
func TestMultiProcessAppCPIPOnly(t *testing.T) {
181165
compose, err := docker.ComposeSuite("docker-compose-multiexec-host.yml", path.Join(pathOutput, "test-suite-multiexec-app-cp-ip-only.log"))
182166
require.NoError(t, err)

pkg/config/ebpf_tracer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ const (
2020
ContextPropagationDisabled ContextPropagationMode = 0
2121
ContextPropagationHeaders ContextPropagationMode = 1 << 0 // HTTP headers
2222
ContextPropagationTCP ContextPropagationMode = 1 << 1 // TCP options
23-
ContextPropagationIPOptions ContextPropagationMode = 1 << 2 // IP options
23+
ContextPropagationIPOptions ContextPropagationMode = 1 << 2 // IP options (dangerous)
2424

2525
// Convenience aliases
26-
ContextPropagationAll = ContextPropagationHeaders | ContextPropagationTCP | ContextPropagationIPOptions
26+
ContextPropagationAll = ContextPropagationHeaders | ContextPropagationTCP
2727
)
2828

2929
// EBPFTracer configuration for eBPF programs

pkg/config/ebpf_tracer_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ func TestContextPropagationMode_UnmarshalText(t *testing.T) {
6060
want: ContextPropagationHeaders | ContextPropagationIPOptions,
6161
},
6262
{
63-
name: "all three",
64-
input: "headers,tcp,ip",
63+
name: "all two",
64+
input: "headers,tcp",
6565
want: ContextPropagationAll,
6666
},
6767
{
6868
name: "with spaces",
6969
input: " headers , tcp , ip ",
70-
want: ContextPropagationAll,
70+
want: ContextPropagationHeaders | ContextPropagationTCP | ContextPropagationIPOptions,
7171
},
7272
{
7373
name: "invalid value",
@@ -133,7 +133,7 @@ func TestContextPropagationMode_MarshalText(t *testing.T) {
133133
{
134134
name: "headers and tcp",
135135
mode: ContextPropagationHeaders | ContextPropagationTCP,
136-
want: "headers,tcp",
136+
want: "all",
137137
},
138138
{
139139
name: "tcp and ip",
@@ -177,7 +177,7 @@ func TestContextPropagationMode_HasMethods(t *testing.T) {
177177
mode: ContextPropagationAll,
178178
wantHeaders: true,
179179
wantTCP: true,
180-
wantIPOptions: true,
180+
wantIPOptions: false,
181181
wantIsEnabled: true,
182182
},
183183
{
@@ -290,7 +290,7 @@ func TestContextPropagationMode_TracerLoading(t *testing.T) {
290290
name: "all",
291291
mode: ContextPropagationAll,
292292
wantTPInject: true,
293-
wantTCTracer: true,
293+
wantTCTracer: false,
294294
},
295295
{
296296
name: "disabled",

pkg/obi/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ func TestWillUseTC(t *testing.T) {
589589

590590
env = envMap{"OTEL_EBPF_BPF_CONTEXT_PROPAGATION": "all"}
591591
cfg = loadConfig(t, env)
592-
assert.True(t, cfg.willUseTC())
592+
assert.False(t, cfg.willUseTC())
593593

594594
env = envMap{"OTEL_EBPF_BPF_CONTEXT_PROPAGATION": "headers"}
595595
cfg = loadConfig(t, env)

0 commit comments

Comments
 (0)