Skip to content

Commit 6260676

Browse files
committed
SO_ATTACH_REUSEPORT_CBPF filter update.
SDK_AD_QUEUE support to attach to a queue.
1 parent d498908 commit 6260676

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ext/sockets/sockets.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,15 +1979,16 @@ PHP_FUNCTION(socket_set_option)
19791979

19801980
switch (k) {
19811981
case SKF_AD_CPU:
1982+
case SKF_AD_QUEUE:
19821983
cbpf[0].code = (BPF_LD|BPF_W|BPF_ABS);
1983-
cbpf[0].k = (uint32_t)(SKF_AD_OFF + k);
1984+
cbpf[0].k = (uint32_t)(SKF_AD_OFF + k);
19841985
cbpf[1].code = (BPF_RET|BPF_A);
1985-
bpfprog.len = 2;
1986+
bpfprog.len = 2;
19861987
break;
19871988
default:
1988-
php_error_docref(NULL, E_WARNING, "Unsupported CBPF filter");
1989-
RETURN_FALSE;
1990-
}
1989+
php_error_docref(NULL, E_WARNING, "Unsupported CBPF filter");
1990+
RETURN_FALSE;
1991+
}
19911992

19921993
bpfprog.filter = cbpf;
19931994
optlen = sizeof(bpfprog);

0 commit comments

Comments
 (0)