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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130807155746.GA16408@eerihug-hybrid.rnd.ki.sw.ericsson.se>
Date:	Wed, 7 Aug 2013 17:57:46 +0200
From:	Erik Hugne <erik.hugne@...csson.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	<netdev@...r.kernel.org>, <tipc-discussion@...ts.sourceforge.net>,
	<jon.maloy@...csson.com>, <ying.xue@...driver.com>
Subject: Re: skbs delivered to 'wrong' packet_type handler

On Wed, Aug 07, 2013 at 06:55:43AM -0700, Eric Dumazet wrote:
> Its not ignored, quite the contrary if you look at the code :
> 
> vi +3595 net/core/dev.c
> 
>         type = skb->protocol;
>         list_for_each_entry_rcu(ptype,
>                         &ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) {
>                 if (ptype->type == type &&
>                     (ptype->dev == null_or_dev || ptype->dev == skb->dev ||
>                      ptype->dev == orig_dev)) {
>                         if (pt_prev)
>                                 ret = deliver_skb(skb, pt_prev, orig_dev);
>                         pt_prev = ptype;
>                 }
>         }
> 
> 
> pkt->dev being set is only meaningful for packet sockets.
> 
> Protocols themselves should not care. If they want to care, they must
> add their own checks.
> 
> Socket API has SO_BINDTODEVICE for this purpose.
> IP layer has RP filtering.
> 
> A protocol should register a single ptype with NULL dev.
>

Very well, we'll have to fix the protocol registration and add appropriate 
checks in TIPC then.
But i fail to understand why a handler registered on the native device needs 
to get the packets destined to a child vlan device (the ptype->dev == orig_dev 
check).

//E

--
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