lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 21 Jul 2015 13:09:10 -0400
From:	Guru Prasad <gurupras@...falo.edu>
To:	netdev@...r.kernel.org
Subject: Identifying underlying interface from struct sock

Hi,

First, I apologize for posting on the netdev forum. Majordomo did not
list any other network related mailing list.

Is there a way to identify the underlying network interface from an
instance of struct sock? I realize that the socket is abstract and
shouldn't/doesn't necessarily depend on the underlying interface, but
say, with TCP, where the connection is endpoint oriented, shouldn't
this mean that the socket maintains a reference to the interface to
which it is associated?

I tried
dev = dev_get_by_index(sock_net(sk), skb->skb_iif);
and
dev = skb->dev;
but in both cases, dev was NULL.

I'm trying to reference the underlying interface to determine whether
the conditions present in that interface are acceptable for
transmission.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ