Thread (8 messages) 8 messages, 3 authors, 2012-10-23

Re: [PATCH 3/3] sock-diag: Report shutdown for inet and unix sockets

flat view

From: Pavel Emelyanov <hidden>
Date: 2012-10-23 17:26:29

On 10/23/2012 08:53 PM, Eric Dumazet wrote:
On Tue, 2012-10-23 at 20:28 +0400, Pavel Emelyanov wrote:
quoted
Add ext bits for inet-diag and unix-diag and report sk_shutdown state.
quoted
 
+	if (ext & (1 << (INET_DIAG_SHUTDOWN - 1)))
+		if (sock_diag_put_shutdown(sk, skb, INET_DIAG_SHUTDOWN))
+			goto errout;
+
I dont feel the need to make this conditional and consume one bit.
OK, but I have one concern about it.

I'll have to add the attrtype for it anyway. And when later we'll add
yet another one, say INET_DIAG_FOO, we will not be able to request
this in such

   req->ext |= (1 << (INET_DIAG_FOO - 1));

manner as it's currently done. If that's OK, I will rework the patch.

Thanks,
Pavel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help