From: Pavel Emelyanov Date: Thu, 18 Oct 2012 23:55:56 +0000 (+0000) Subject: sockopt: Make SO_BINDTODEVICE readable X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~621 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7b86bfe8d9f10e5a9fcacf52dddf29d0d58a33b;p=pandora-kernel.git sockopt: Make SO_BINDTODEVICE readable The SO_BINDTODEVICE option is the only SOL_SOCKET one that can be set, but cannot be get via sockopt API. The only way we can find the device id a socket is bound to is via sock-diag interface. But the diag works only on hashed sockets, while the opt in question can be set for yet unhashed one. That said, in order to know what device a socket is bound to (we do want to know this in checkpoint-restore project) I propose to make this option getsockopt-able and report the respective device index. Another solution to the problem might be to teach the sock-diag reporting info on unhashed sockets. Should I go this way instead? Signed-off-by: Pavel Emelyanov Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed