Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1992094yba; Tue, 2 Apr 2019 22:02:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG9NzsGRmOzwTI6N2fThQGCzgpW6WLSvF1PXh0RsHRG/BfZCPS8h1gqAqz/ay4xPjvJ9o9 X-Received: by 2002:a63:88c3:: with SMTP id l186mr71375942pgd.148.1554267752200; Tue, 02 Apr 2019 22:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554267752; cv=none; d=google.com; s=arc-20160816; b=GkUMJ3DytkoJoVU6BPEywPMKnbV3zN2cvaVyTqhQAQvJ3zp0+habep63P3HWDHkVCx jB67zJlp/eyJxPewD5N2FwD47IboJV21KE1ndJUA4S6gL86K2WDpZDFZiNS9SYQpbG79 ei+i/YOcEHof+196D6M2QLbrVcE06NXxwb0dyjo+45YTUOAo1iFrWzWp8jHDhN4hnYXU 2NpolpJ8juUcUUt7KC62hLIpGdvrgVssbrV0HFE2x1F4M/Hfb9r5kQsX4suyrucIqA+W XTYT7cWZU7hkfgElmjFMXonczgzJXvrmOM/wLNkecVFunWaJCS585bWjqtCyjzEln7oo wyXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=58Zu5vmHe885A/fUC14Tvaw2u82e/JCV4D0YvhUGg5E=; b=ViVICG1+Qk+OYNf6q+KZoAxGdxc/oSAyeLqcjS0k7oTd3UJG9warEnfTOfAs+Fvx8k NplPlbv9egXoSQ3CmMlfQBY9B8GU5CiH0Ql77ZH6y+dQ7w92bEozwBkziwwnDx3p2Kqe gOcfEnQhoOod6JJq2Uq6MgIfPNzM0Ybg7QP5YIwZvI5L0LEWWciUU24aMDShkfiqoliR 0Wiqxp8qjPCufZGq55O7G3LWikpFOhQ+qj+A56VTQOXW3KCHt/Ea+rTrbMFJtBgcceRb Nkh7d9+wGNNHA8zJQ/5FLDjEcA4MPhBT5TYPUjKNpPGvEFO5NFK4YtbOFhpaQoJU2afx OsCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si12954507pfi.193.2019.04.02.22.02.16; Tue, 02 Apr 2019 22:02:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728726AbfDCFBg (ORCPT + 99 others); Wed, 3 Apr 2019 01:01:36 -0400 Received: from host-88-217-225-28.customer.m-online.net ([88.217.225.28]:34430 "EHLO mail.dev.tdt.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726676AbfDCFBf (ORCPT ); Wed, 3 Apr 2019 01:01:35 -0400 Received: from localhost.localdomain (unknown [10.2.3.20]) by mail.dev.tdt.de (Postfix) with ESMTPSA id 9C18220B22; Wed, 3 Apr 2019 05:01:33 +0000 (UTC) From: Martin Schiller To: andrew.hendry@gmail.com, davem@davemloft.net, khc@pm.waw.pl, isdn@linux-pingi.de Cc: edumazet@google.com, linux-x25@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Schiller Subject: [PATCH 3/4] isdn/i4l/isdn_x25iface: call skb_reset_network_header Date: Wed, 3 Apr 2019 07:01:17 +0200 Message-Id: <20190403050118.12785-3-ms@dev.tdt.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190403050118.12785-1-ms@dev.tdt.de> References: <20190403050118.12785-1-ms@dev.tdt.de> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... after skb_push() / skb_pull(). This fixes the output of tcpdump. Signed-off-by: Martin Schiller --- drivers/isdn/i4l/isdn_x25iface.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c index 48bfbcb4a09d..ffd50fa47111 100644 --- a/drivers/isdn/i4l/isdn_x25iface.c +++ b/drivers/isdn/i4l/isdn_x25iface.c @@ -194,6 +194,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb if (((ix25_pdata_t *)(cprot->proto_data)) ->state == WAN_CONNECTED) { if (skb_push(skb, 1)) { + skb_reset_network_header(skb); skb->data[0] = X25_IFACE_DATA; skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); @@ -225,6 +226,7 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot) skb = dev_alloc_skb(1); if (skb) { skb_put_u8(skb, X25_IFACE_CONNECT); + skb_reset_network_header(skb); skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; @@ -254,6 +256,7 @@ static int isdn_x25iface_disconn_ind(struct concap_proto *cprot) skb = dev_alloc_skb(1); if (skb) { skb_put_u8(skb, X25_IFACE_DISCONNECT); + skb_reset_network_header(skb); skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; @@ -278,10 +281,14 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb) case X25_IFACE_DATA: if (*state == WAN_CONNECTED) { skb_pull(skb, 1); + skb_reset_network_header(skb); netif_trans_update(cprot->net_dev); ret = (cprot->dops->data_req(cprot, skb)); /* prepare for future retransmissions */ - if (ret) skb_push(skb, 1); + if (ret) { + skb_push(skb, 1); + skb_reset_network_header(skb); + } return ret; } illegal_state_warn(*state, firstbyte); -- 2.11.0