)]}'
{
  "commit": "c72219b75fde768efccf7666342282fab7f9e4e7",
  "tree": "5d58d422d2fb6349c8f68eedc578042cfc0efd9a",
  "parents": [
    "3c70c132488794e2489ab045559b0ce0afcf17de"
  ],
  "author": {
    "name": "Daniel Borkmann",
    "email": "daniel@iogearbox.net",
    "time": "Wed Nov 11 23:25:43 2015 +0100"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Sun Nov 15 18:00:35 2015 -0500"
  },
  "message": "packet: infer protocol from ethernet header if unset\n\nIn case no struct sockaddr_ll has been passed to packet\nsocket\u0027s sendmsg() when doing a TX_RING flush run, then\nskb-\u003eprotocol is set to po-\u003enum instead, which is the protocol\npassed via socket(2)/bind(2).\n\nApplications only xmitting can go the path of allocating the\nsocket as socket(PF_PACKET, \u003cmode\u003e, 0) and do a bind(2) on the\nTX_RING with sll_protocol of 0. That way, register_prot_hook()\nis neither called on creation nor on bind time, which saves\ncycles when there\u0027s no interest in capturing anyway.\n\nThat leaves us however with po-\u003enum 0 instead and therefore\nthe TX_RING flush run sets skb-\u003eprotocol to 0 as well. Eric\nreported that this leads to problems when using tools like\ntrafgen over bonding device. I.e. the bonding\u0027s hash function\ncould invoke the kernel\u0027s flow dissector, which depends on\nskb-\u003eprotocol being properly set. In the current situation, all\nthe traffic is then directed to a single slave.\n\nFix it up by inferring skb-\u003eprotocol from the Ethernet header\nwhen not set and we have ARPHRD_ETHER device type. This is only\ndone in case of SOCK_RAW and where we have a dev-\u003ehard_header_len\nlength. In case of ARPHRD_ETHER devices, this is guaranteed to\ncover ETH_HLEN, and therefore being accessed on the skb after\nthe skb_store_bits().\n\nReported-by: Eric Dumazet \u003cedumazet@google.com\u003e\nSigned-off-by: Daniel Borkmann \u003cdaniel@iogearbox.net\u003e\nAcked-by: Willem de Bruijn \u003cwillemb@google.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8795b0fb1ed1c0976d3ec80b5891d8bd6099a703",
      "old_mode": 33188,
      "old_path": "net/packet/af_packet.c",
      "new_id": "0066da2b8e44420951e207a9963a8ac8e63763c4",
      "new_mode": 33188,
      "new_path": "net/packet/af_packet.c"
    }
  ]
}
