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
39 * if neither port numberis 5560139 * if neither port numberis 55601
40 */40 */
41 if (bpf_ntohl(skops->remote_port) != 55601 &&41 if (bpf_ntohl(skops->remote_port) != 55601 &&
42 skops->local_port != 55601)42 skops->local_port != 55601) {
43 return -1;43 skops->reply = -1;
44 return 1;
45 }
44 46
45 op = (int) skops->op;47 op = (int) skops->op;
46 48

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