From: Phil Sutter <phil@nwl.cc>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
wireless <linux-wireless@vger.kernel.org>,
John Linville <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: linux-next: Tree for Aug 7
Date: Wed, 7 Aug 2013 17:59:18 +0200 [thread overview]
Message-ID: <20130807155918.GA16263@orbit.nwl.cc> (raw)
In-Reply-To: <CA+icZUW+uxCsvPYcY2RRvMxRVzaBLuH9u8M4ziQNWXv=nk4b2w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]
On Wed, Aug 07, 2013 at 10:29:18AM +0200, Sedat Dilek wrote:
> On Wed, Aug 7, 2013 at 7:54 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Hi all,
> >
> > Changes since 20130806:
> >
> > The ext4 tree lost its build failure.
> >
> > The mvebu tree gained a build failure so I used the version from
> > next-20130806.
> >
> > The akpm tree gained conflicts against the ext4 tree.
> >
> > ----------------------------------------------------------------------------
> >
>
> [ CC some netdev and wireless folks ]
>
> Yesterday, I discovered an issue with net-next.
> The patch in [1] fixed the problems in my network/wifi environment.
> Hannes confirmed that virtio_net are solved, too.
> Today's next-20130807 still needs it for affected people.
>
> - Sedat -
>
> [1] http://marc.info/?l=linux-netdev&m=137582524017840&w=2
> [2] http://marc.info/?l=linux-netdev&m=137583048219416&w=2
> [3] http://marc.info/?t=137579712800008&r=1&w=2
Could you please try the attached patch. It limits parsing the ethernet
header (by calling eth_type_trans()) to cases when the configured
protocol is ETH_P_ALL, so at least for 802.1X this should fix the
problem.
The idea behind this patch is that users setting the protocol to
something else probably do know better and so should be left alone.
Best wishes, Phil
[-- Attachment #2: af_packet_fixup.diff --]
[-- Type: text/plain, Size: 1606 bytes --]
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index bbe1ece..66bc79c 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1932,8 +1932,6 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
ph.raw = frame;
- skb->protocol = proto;
- skb->dev = dev;
skb->priority = po->sk.sk_priority;
skb->mark = po->sk.sk_mark;
sock_tx_timestamp(&po->sk, &skb_shinfo(skb)->tx_flags);
@@ -2002,13 +2000,18 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
if (unlikely(err))
return err;
- if (dev->type == ARPHRD_ETHER)
- skb->protocol = eth_type_trans(skb, dev);
-
data += dev->hard_header_len;
to_write -= dev->hard_header_len;
}
+ if (dev->type == ARPHRD_ETHER &&
+ proto = htons(ETH_P_ALL)) {
+ skb->protocol = eth_type_trans(skb, dev);
+ } else {
+ skb->protocol = proto;
+ skb->dev = dev;
+ }
+
max_frame_len = dev->mtu + dev->hard_header_len;
if (skb->protocol == htons(ETH_P_8021Q))
max_frame_len += VLAN_HLEN;
@@ -2331,15 +2334,17 @@ static int packet_snd(struct socket *sock,
sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
- if (dev->type == ARPHRD_ETHER) {
+ if (dev->type == ARPHRD_ETHER &&
+ proto == htons(ETH_P_ALL)) {
skb->protocol = eth_type_trans(skb, dev);
- if (skb->protocol == htons(ETH_P_8021Q))
- reserve += VLAN_HLEN;
} else {
skb->protocol = proto;
skb->dev = dev;
}
+ if (skb->protocol == htons(ETH_P_8021Q))
+ reserve += VLAN_HLEN;
+
if (!gso_type && (len > dev->mtu + reserve + extra_len)) {
err = -EMSGSIZE;
goto out_free;
next prev parent reply other threads:[~2013-08-07 15:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130807155443.a0355d0429f3e0b4ccbed261@canb.auug.org.au>
2013-08-07 8:29 ` linux-next: Tree for Aug 7 Sedat Dilek
2013-08-07 15:59 ` Phil Sutter [this message]
2013-08-07 16:12 ` Johannes Berg
2013-08-07 16:17 ` Eric Dumazet
2013-08-07 16:22 ` Johannes Berg
2013-08-07 16:40 ` Eric Dumazet
2013-08-07 17:47 ` David Miller
2013-08-07 18:37 ` Phil Sutter
2013-08-07 23:27 ` David Miller
2013-08-07 23:36 ` David Miller
2013-08-08 0:02 ` Sedat Dilek
2013-08-08 0:09 ` David Miller
2013-08-08 0:13 ` David Miller
2013-08-08 0:06 ` Eric Dumazet
2013-08-09 13:58 ` Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130807155918.GA16263@orbit.nwl.cc \
--to=phil@nwl.cc \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=sedat.dilek@gmail.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).