diff --git a/net/core/sock.c b/net/core/sock.c index 8a146cfcc366fbead42d31d882893a74ec8dcf4e..c49412cdd12c867ffda0afefe1d2146d25e002bc 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1074,6 +1074,9 @@ int sock_getsockopt(struct socket *sock, int level, int optname, case SO_NOFCS: v.val = sock_flag(sk, SOCK_NOFCS); break; + case SO_BINDTODEVICE: + v.val = sk->sk_bound_dev_if; + break; default: return -ENOPROTOOPT; }