From patchwork Wed Apr 17 16:18:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick McHardy X-Patchwork-Id: 2454481 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E9332DF23A for ; Wed, 17 Apr 2013 16:19:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965148Ab3DQQTJ (ORCPT ); Wed, 17 Apr 2013 12:19:09 -0400 Received: from stinky.trash.net ([213.144.137.162]:60739 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755557Ab3DQQTD (ORCPT ); Wed, 17 Apr 2013 12:19:03 -0400 Received: from stinky.trash.net (unknown [127.0.0.1]) by stinky.trash.net (Postfix) with ESMTP id 476299D2E3; Wed, 17 Apr 2013 18:18:56 +0200 (MEST) From: Patrick McHardy To: jon.maloy@ericsson.com Cc: davem@davemloft.net, 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, 17 Apr 2013 18:18:27 +0200 Message-Id: <1366215509-18500-4-git-send-email-kaber@trash.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1366215509-18500-1-git-send-email-kaber@trash.net> References: <1366215509-18500-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);