Commit 49e1fa8
selftests/bpf: Use start_server_addr in test_tcp_check_syncookie
Include network_helpers.h in test_tcp_check_syncookie_user.c, use
public helper start_server_addr() in it instead of the local defined
function start_server(). This can avoid duplicate code.
Add two helpers v6only_true() and v6only_false() to set IPV6_V6ONLY
sockopt to true or false, set them to post_socket_cb pointer of struct
network_helper_opts, and pass it to start_server_setsockopt().
In order to use functions defined in network_helpers.c, Makefile needs
to be updated too.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/e0c5324f5da84f453f47543536e70f126eaa8678.1714907662.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>1 parent 5166b3e commit 49e1fa8
2 files changed
Lines changed: 25 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
Lines changed: 24 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 19 | + | |
57 | 20 | | |
58 | 21 | | |
59 | 22 | | |
| |||
216 | 179 | | |
217 | 180 | | |
218 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
219 | 196 | | |
220 | 197 | | |
| 198 | + | |
221 | 199 | | |
222 | 200 | | |
223 | 201 | | |
| |||
259 | 237 | | |
260 | 238 | | |
261 | 239 | | |
262 | | - | |
263 | | - | |
| 240 | + | |
| 241 | + | |
264 | 242 | | |
265 | 243 | | |
266 | 244 | | |
267 | | - | |
268 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
269 | 248 | | |
270 | 249 | | |
271 | 250 | | |
272 | | - | |
273 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
274 | 254 | | |
275 | 255 | | |
276 | 256 | | |
| |||
0 commit comments