Commit 60db5e7
bpf: add bpf_icmp_send_unreach cgroup_skb kfunc
This is needed in the context of Tetragon to provide improved feedback
(in contrast to just dropping packets) to east-west traffic when blocked
by policies using cgroup_skb programs.
This reuse concepts from netfilter reject target codepath with the
differences that:
* Packets are cloned since the BPF user can still return SK_PASS from
the cgroup_skb progs and the current skb need to stay untouched
(cgroup_skb hooks only allow read-only skb payload).
* Since cgroup_skb programs are called late in the stack, checksums do
not need to be computed or verified, and IPv4 fragmentation does not
need to be checked (ip_local_deliver should take care of that
earlier).
Signed-off-by: Mahe Tardy <[email protected]>1 parent bf83922 commit 60db5e7
1 file changed
+61
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
12148 | 12152 | | |
12149 | 12153 | | |
12150 | 12154 | | |
| 12155 | + | |
| 12156 | + | |
| 12157 | + | |
| 12158 | + | |
| 12159 | + | |
| 12160 | + | |
| 12161 | + | |
| 12162 | + | |
| 12163 | + | |
| 12164 | + | |
| 12165 | + | |
| 12166 | + | |
| 12167 | + | |
| 12168 | + | |
| 12169 | + | |
| 12170 | + | |
| 12171 | + | |
| 12172 | + | |
| 12173 | + | |
| 12174 | + | |
| 12175 | + | |
| 12176 | + | |
| 12177 | + | |
| 12178 | + | |
| 12179 | + | |
| 12180 | + | |
| 12181 | + | |
| 12182 | + | |
| 12183 | + | |
| 12184 | + | |
| 12185 | + | |
| 12186 | + | |
| 12187 | + | |
| 12188 | + | |
| 12189 | + | |
| 12190 | + | |
| 12191 | + | |
| 12192 | + | |
| 12193 | + | |
| 12194 | + | |
| 12195 | + | |
| 12196 | + | |
| 12197 | + | |
| 12198 | + | |
| 12199 | + | |
| 12200 | + | |
| 12201 | + | |
12151 | 12202 | | |
12152 | 12203 | | |
12153 | 12204 | | |
| |||
12185 | 12236 | | |
12186 | 12237 | | |
12187 | 12238 | | |
| 12239 | + | |
| 12240 | + | |
| 12241 | + | |
| 12242 | + | |
12188 | 12243 | | |
12189 | 12244 | | |
12190 | 12245 | | |
| |||
12210 | 12265 | | |
12211 | 12266 | | |
12212 | 12267 | | |
| 12268 | + | |
| 12269 | + | |
| 12270 | + | |
| 12271 | + | |
| 12272 | + | |
12213 | 12273 | | |
12214 | 12274 | | |
12215 | 12275 | | |
| |||
12229 | 12289 | | |
12230 | 12290 | | |
12231 | 12291 | | |
| 12292 | + | |
12232 | 12293 | | |
12233 | 12294 | | |
12234 | 12295 | | |
| |||
0 commit comments