)]}'
{
  "commit": "f271b2cc78f09c93ccd00a2056d3237134bf994c",
  "tree": "25b379fa23a84627992c197d2e18793fd90c2a7e",
  "parents": [
    "89146504cbfeb120dd08ec7f9f8314c4986189b8"
  ],
  "author": {
    "name": "Max Krasnyansky",
    "email": "maxk@qualcomm.com",
    "time": "Mon Jul 14 22:18:19 2008 -0700"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Mon Jul 14 22:18:19 2008 -0700"
  },
  "message": "tun: Fix/rewrite packet filtering logic\n\nPlease see the following thread to get some context on this\n\thttp://marc.info/?l\u003dlinux-netdev\u0026m\u003d121564433018903\u0026w\u003d2\n\nBasically the issue is that current multi-cast filtering stuff in\nthe TUN/TAP driver is seriously broken.\nOriginal patch went in without proper review and ACK. It was broken and\nconfusing to start with and subsequent patches broke it completely.\nTo give you an idea of what\u0027s broken here are some of the issues:\n\n- Very confusing comments throughout the code that imply that the\ncharacter device is a network interface in its own right, and that packets\nare passed between the two nics. Which is completely wrong.\n\n- Wrong set of ioctls is used for setting up filters. They look like\nshortcuts for manipulating state of the tun/tap network interface but\nin reality manipulate the state of the TX filter.\n\n- ioctls that were originally used for setting address of the the TX filter\ngot \"fixed\" and now set the address of the network interface itself. Which\nmade filter totaly useless.\n\n- Filtering is done too late. Instead of filtering early on, to avoid\nunnecessary wakeups, filtering is done in the read() call.\n\nThe list goes on and on :)\n\nSo the patch cleans all that up. It introduces simple and clean interface for\nsetting up TX filters (TUNSETTXFILTER + tun_filter spec) and does filtering\nbefore enqueuing the packets.\n\nTX filtering is useful in the scenarios where TAP is part of a bridge, in\nwhich case it gets all broadcast, multicast and potentially other packets when\nthe bridge is learning. So for example Ethernet tunnelling app may want to\nsetup TX filters to avoid tunnelling multicast traffic. QEMU and other\nhypervisors can push RX filtering that is currently done in the guest into the\nhost context therefore saving wakeups and unnecessary data transfer.\n\nSigned-off-by: Max Krasnyansky \u003cmaxk@qualcomm.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2693f883ecda78d112fe181ddc39da8e17edfd42",
      "old_mode": 33188,
      "old_path": "drivers/net/tun.c",
      "new_id": "901551c8ca0ea1c34457a47f89f1c42f856d84c2",
      "new_mode": 33188,
      "new_path": "drivers/net/tun.c"
    },
    {
      "type": "modify",
      "old_id": "563fae542da621c90017f623af2da3478030e2b5",
      "old_mode": 33188,
      "old_path": "include/linux/if_tun.h",
      "new_id": "4c6307ad9fdb525ebfd6cf2e95b5540d45bb2122",
      "new_mode": 33188,
      "new_path": "include/linux/if_tun.h"
    }
  ]
}
