From patchwork Wed Apr 3 12:43:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick McHardy X-Patchwork-Id: 2387031 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A69374020C for ; Wed, 3 Apr 2013 12:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760314Ab3DCMyE (ORCPT ); Wed, 3 Apr 2013 08:54:04 -0400 Received: from stinky.trash.net ([213.144.137.162]:48243 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759677Ab3DCMyB (ORCPT ); Wed, 3 Apr 2013 08:54:01 -0400 Received: from macbook.localnet.Speedport_W_723V_1_27_000 (unknown [127.0.0.1]) by stinky.trash.net (Postfix) with ESMTP id 22D8A9D2E0; Wed, 3 Apr 2013 14:43:41 +0200 (MEST) From: Patrick McHardy To: jon.maloy@ericsson.com Cc: allan.stephens@windriver.com, netdev@vger.kernel.org, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org Subject: [PATCH 3/5] tipc: set skb->protocol in eth_media packet transmission Date: Wed, 3 Apr 2013 14:43:28 +0200 Message-Id: <1364993010-15515-4-git-send-email-kaber@trash.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1364993010-15515-1-git-send-email-kaber@trash.net> References: <1364993010-15515-1-git-send-email-kaber@trash.net> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The skb->protocol field is used by packet classifiers and for AF_PACKET cooked format, TIPC needs to set it properly. Fixes packet classification and ethertype of 0x0000 in cooked captures: Out 20:c9:d0:43:12:d9 ethertype Unknown (0x0000), length 56: 0x0000: 5b50 0028 0000 30d4 0100 1000 0100 1001 [P.(..0......... 0x0010: 0000 03e8 0000 0001 20c9 d043 12d9 0000 ...........C.... 0x0020: 0000 0000 0000 0000 ........ Signed-off-by: Patrick McHardy --- net/tipc/eth_media.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 0648819..120a676 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -111,6 +111,7 @@ static int send_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr, skb_reset_network_header(clone); clone->dev = dev; + clone->protocol = htons(ETH_P_TIPC); dev_hard_header(clone, dev, ETH_P_TIPC, dest->value, dev->dev_addr, clone->len); dev_queue_xmit(clone);