diff options
| author | Lawrence Brakmo <brakmo@fb.com> | 2017-07-01 06:02:47 +0300 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-07-02 02:15:14 +0300 | 
| commit | 9872a4bde31b0b055448e9ac1f4c9ee62d978766 (patch) | |
| tree | d335c073d98d9a96983b1e0b5a341957c8dc982d /net/ipv4/tcp_output.c | |
| parent | 8c4b4c7e9ff0447995750d9329949fa082520269 (diff) | |
| download | linux-9872a4bde31b0b055448e9ac1f4c9ee62d978766.tar.xz | |
bpf: Add TCP connection BPF callbacks
Added callbacks to BPF SOCK_OPS type program before an active
connection is intialized and after a passive or active connection is
established.
The following patch demostrates how they can be used to set send and
receive buffer sizes.
Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ef809426b538..33b3e401e812 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3444,6 +3444,7 @@ int tcp_connect(struct sock *sk)  	struct sk_buff *buff;  	int err; +	tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_CONNECT_CB);  	tcp_connect_init(sk);  	if (unlikely(tp->repair)) {  | 
