mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
Accept response from netlink just if inode is valid
Sometimes we get wrong values for Uid field, so just check if the inode field is valid to accept the response from netlink.
This commit is contained in:
parent
9207465d58
commit
6646ee469a
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ func newConnectionImpl(nfp *netfilter.Packet, c *Connection) (cr *Connection, er
|
|||
// 2. lookup pid by inode
|
||||
// 3. if this is coming from us, just accept
|
||||
// 4. lookup process info by pid
|
||||
if _uid, _inode := netlink.GetSocketInfo(c.Protocol, c.SrcIP, c.SrcPort, c.DstIP, c.DstPort); _uid != -1 && _inode != -1 {
|
||||
if _uid, _inode := netlink.GetSocketInfo(c.Protocol, c.SrcIP, c.SrcPort, c.DstIP, c.DstPort); _inode > 0 {
|
||||
c.Entry = &netstat.Entry {
|
||||
Proto: c.Protocol,
|
||||
SrcIP: c.SrcIP,
|
||||
|
|
Loading…
Add table
Reference in a new issue