Skip to content

Commit 5145727

Browse files
committed
Re-add tun/tap to default device rules
Since v1.2.0 was released, a number of users complained that the removal of tun/tap device access from the default device ruleset is causing a regression in their workloads. Additionally, it seems that some upper-level orchestration tools (Docker Swarm, Kubernetes) makes it either impossible or cumbersome to supply additional device rules. While it's probably not quite right to have /dev/net/tun in a default device list, it was there from the very beginning, and users rely on it. Let's keep it there for the sake of backward compatibility. This reverts commit ab4e720. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 49cd3bd commit 5145727

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

devices/devicefilter_test.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,21 @@ block-8:
120120
51: MovImm32 dst: r0 imm: 1
121121
52: Exit
122122
block-9:
123-
// /dev/pts (c, 136, wildcard, rwm, true)
123+
// tuntap (c, 10, 200, rwm, true)
124124
53: JNEImm dst: r2 off: -1 imm: 2 <block-10>
125-
54: JNEImm dst: r4 off: -1 imm: 136 <block-10>
126-
55: MovImm32 dst: r0 imm: 1
127-
56: Exit
125+
54: JNEImm dst: r4 off: -1 imm: 10 <block-10>
126+
55: JNEImm dst: r5 off: -1 imm: 200 <block-10>
127+
56: MovImm32 dst: r0 imm: 1
128+
57: Exit
128129
block-10:
129-
57: MovImm32 dst: r0 imm: 0
130-
58: Exit
130+
// /dev/pts (c, 136, wildcard, rwm, true)
131+
58: JNEImm dst: r2 off: -1 imm: 2 <block-11>
132+
59: JNEImm dst: r4 off: -1 imm: 136 <block-11>
133+
60: MovImm32 dst: r0 imm: 1
134+
61: Exit
135+
block-11:
136+
62: MovImm32 dst: r0 imm: 0
137+
63: Exit
131138
`
132139
var devices []*devices.Rule
133140
for _, device := range specconv.AllowedDevices {

0 commit comments

Comments
 (0)