History

bpf: Fix tcp_cong_kern.c sample program

The program was returning -1 in some cases which is not allowed by the verifier any longer.

Lawrence Brakmo committed 9 years ago

Commit 2ff969f1 parent a4174f01 file · +4 −2Browse files

Unified · Split

samples/bpf/tcp_cong_kern.c+4−2
@@ -39,8 +39,10 @@ int bpf_cong(struct bpf_sock_ops *skops) · 38 unmodified lines
3939 * if neither port numberis 55601
4040 */
4141 if (bpf_ntohl(skops->remote_port) != 55601 &&
42− skops->local_port != 55601)
43− return -1;
42+ skops->local_port != 55601) {
43+ skops->reply = -1;
44+ return 1;
45+ }
4446
4547 op = (int) skops->op;
4648

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t