From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754132AbdCaSxQ (ORCPT ); Fri, 31 Mar 2017 14:53:16 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:35138 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbdCaSxO (ORCPT ); Fri, 31 Mar 2017 14:53:14 -0400 From: Nicolas Iooss Subject: Pointer type of _arp in __skb_flow_dissect() To: "David S. Miller" , Simon Horman , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Message-ID: <9bb97603-3b86-73cb-8ed8-c421055138a6@m4x.org> Date: Fri, 31 Mar 2017 20:53:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Linux 4.11-rc4 contains the following code in function __skb_flow_dissect(), file net/core/flow_dissector.c: const struct arphdr *arp; struct arphdr *_arp; arp = __skb_header_pointer(skb, nhoff, sizeof(_arp), data, hlen, &_arp); Here _arp and arp are both pointers to arphdr structures. In other calls to __skb_header_pointer(), the buffer argument (_arp here) would have been a struct instead of a pointer. What makes ARP packets different in __skb_flow_dissect()? Thanks, Nicolas PS: the code which I am curious about seems to have been introduced in 4.11-rc1 with commit 55733350e5e8 ("flow disector: ARP support")