)]}'
{
  "commit": "f13ec93fba60d339dc1663eb47b2fb801225d2d2",
  "tree": "1f6f12311f307d46b33a2a2afae43853f28fb5ad",
  "parents": [
    "d09f51b6997f3f443c5741bc696651e479576715"
  ],
  "author": {
    "name": "Dmitry Butskoy",
    "email": "dmitry@butskoy.name",
    "time": "Sat Jul 14 23:53:08 2007 -0700"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Sat Jul 14 23:53:08 2007 -0700"
  },
  "message": "[IPV6]: MSG_ERRQUEUE messages do not pass to connected raw sockets\n\nFrom: Dmitry Butskoy \u003cdmitry@butskoy.name\u003e\n\nTaken from http://bugzilla.kernel.org/show_bug.cgi?id\u003d8747\n\nProblem Description:\n\nIt is related to the possibility to obtain MSG_ERRQUEUE messages from the udp\nand raw sockets, both connected and unconnected.\n\nThere is a little typo in net/ipv6/icmp.c code, which prevents such messages\nto be delivered to the errqueue of the correspond raw socket, when the socket\nis CONNECTED.  The typo is due to swap of local/remote addresses.\n\nConsider __raw_v6_lookup() function from net/ipv6/raw.c. When a raw socket is\nlooked up usual way, it is something like:\n\nsk \u003d __raw_v6_lookup(sk, nexthdr, daddr, saddr, IP6CB(skb)-\u003eiif);\n\nwhere \"daddr\" is a destination address of the incoming packet (IOW our local\naddress), \"saddr\" is a source address of the incoming packet (the remote end).\n\nBut when the raw socket is looked up for some icmp error report, in\nnet/ipv6/icmp.c:icmpv6_notify() , daddr/saddr are obtained from the echoed\nfragment of the \"bad\" packet, i.e.  \"daddr\" is the original destination\naddress of that packet, \"saddr\" is our local address.  Hence, for\nicmpv6_notify() must use \"saddr, daddr\" in its arguments, not \"daddr, saddr\"\n...\n\nSteps to reproduce:\n\nCreate some raw socket, connect it to an address, and cause some error\nsituation: f.e. set ttl\u003d1 where the remote address is more than 1 hop to reach.\nSet IPV6_RECVERR .\nThen send something and wait for the error (f.e. poll() with POLLERR|POLLIN).\nYou should receive \"time exceeded\" icmp message (because of \"ttl\u003d1\"), but the\nsocket do not receive it.\n\nIf you do not connect your raw socket, you will receive MSG_ERRQUEUE\nsuccessfully.  (The reason is that for unconnected socket there are no actual\nchecks for local/remote addresses).\n\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4765a29f98a8e003b535ed7aedcf1b97d63b98e5",
      "old_mode": 33188,
      "old_path": "net/ipv6/icmp.c",
      "new_id": "6a6714d154ed08422141ffecd05032be02fb8a80",
      "new_mode": 33188,
      "new_path": "net/ipv6/icmp.c"
    }
  ]
}
