Messages in this thread | | | Subject | Re: [PATCH] Allow TCP connections to cache SYN packet for userspace inspection | From | Eric Dumazet <> | Date | Fri, 01 May 2015 13:41:34 -0700 |
| |
On Fri, 2015-05-01 at 16:29 -0400, Eric B Munson wrote:
> > > As long as your implementation provides the IP and TCP headers, I would > be happy with that. I am also happy to rework my implementation to > extract and cache information when the request structure is built. If > you all have an implementation that you want to post, I will add my ack > if it meets our needs as well.
Yes, I believe it will be easier we provide our implementation instead of reviewing yours ;)
For example you had :
+ case TCP_SAVED_SYN: + if (!((1 << sk->sk_state) & TCPF_LISTEN)) + err = -EINVAL; + tp->saved_syn = !!(val); + break;
But if you return an error, tp->saved_syn should be left unchanged.
| |