1. 03 1月, 2015 8 次提交
  2. 01 1月, 2015 20 次提交
  3. 30 12月, 2014 9 次提交
  4. 27 12月, 2014 3 次提交
    • J
      netlink/genetlink: pass network namespace to bind/unbind · 023e2cfa
      Johannes Berg 提交于
      Netlink families can exist in multiple namespaces, and for the most
      part multicast subscriptions are per network namespace. Thus it only
      makes sense to have bind/unbind notifications per network namespace.
      
      To achieve this, pass the network namespace of a given client socket
      to the bind/unbind functions.
      
      Also do this in generic netlink, and there also make sure that any
      bind for multicast groups that only exist in init_net is rejected.
      This isn't really a problem if it is accepted since a client in a
      different namespace will never receive any notifications from such
      a group, but it can confuse the family if not rejected (it's also
      possible to silently (without telling the family) accept it, but it
      would also have to be ignored on unbind so families that take any
      kind of action on bind/unbind won't do unnecessary work for invalid
      clients like that.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      023e2cfa
    • J
      genetlink: pass multicast bind/unbind to families · c380d9a7
      Johannes Berg 提交于
      In order to make the newly fixed multicast bind/unbind
      functionality in generic netlink, pass them down to the
      appropriate family.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c380d9a7
    • J
      netlink: call unbind when releasing socket · 7d68536b
      Johannes Berg 提交于
      Currently, netlink_unbind() is only called when the socket
      explicitly unbinds, which limits its usefulness (luckily
      there are no users of it yet anyway.)
      
      Call netlink_unbind() also when a socket is released, so it
      becomes possible to track listeners with this callback and
      without also implementing a netlink notifier (and checking
      netlink_has_listeners() in there.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d68536b