Hi Marcel, On Sat, Mar 3, 2012 at 2:33 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: > Hi Luiz, > >> Maybe could be done in kernel automatically as it could be considered >> broken in case of SOCK_SEQPACKET if socket buffer cannot hold a >> write/read of MTU size. > > I have actually no idea what the right approach here is, but we should > handle this inside the kernel. > > So should setting a too large MTU fail if the socket buffers are too > small? Or just we just adjust the socket buffers when a large MTU is > set? Any comments? I guess we should attempt to adjust the socket buffers if the MTU is too large to fit, if that fail than MTU changes should also fail and then client decide if it wants to disconnect or not. We should probably check for capabilities if the process has CAP_NET_ADMIN we can probably force the buffers to be bigger than wmem_max otherwise it should be limited by wmem_max. -- Luiz Augusto von Dentz -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html