1. 23 4月, 2014 1 次提交
    • R
      netlink: have netlink per-protocol bind function return an error code. · 4f520900
      Richard Guy Briggs 提交于
      Have the netlink per-protocol optional bind function return an int error code
      rather than void to signal a failure.
      
      This will enable netlink protocols to perform extra checks including
      capabilities and permissions verifications when updating memberships in
      multicast groups.
      
      In netlink_bind() and netlink_setsockopt() the call to the per-protocol bind
      function was moved above the multicast group update to prevent any access to
      the multicast socket groups before checking with the per-protocol bind
      function.  This will enable the per-protocol bind function to be used to check
      permissions which could be denied before making them available, and to avoid
      the messy job of undoing the addition should the per-protocol bind function
      fail.
      
      The netfilter subsystem seems to be the only one currently using the
      per-protocol bind function.
      Signed-off-by: NRichard Guy Briggs <rgb@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f520900
  2. 11 3月, 2014 1 次提交
    • E
      netlink: autosize skb lengthes · 9063e21f
      Eric Dumazet 提交于
      One known problem with netlink is the fact that NLMSG_GOODSIZE is
      really small on PAGE_SIZE==4096 architectures, and it is difficult
      to know in advance what buffer size is used by the application.
      
      This patch adds an automatic learning of the size.
      
      First netlink message will still be limited to ~4K, but if user used
      bigger buffers, then following messages will be able to use up to 16KB.
      
      This speedups dump() operations by a large factor and should be safe
      for legacy applications.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Thomas Graf <tgraf@suug.ch>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9063e21f
  3. 16 8月, 2013 1 次提交
  4. 11 6月, 2013 1 次提交
    • G
      netlink: Add compare function for netlink_table · da12c90e
      Gao feng 提交于
      As we know, netlink sockets are private resource of
      net namespace, they can communicate with each other
      only when they in the same net namespace. this works
      well until we try to add namespace support for other
      subsystems which use netlink.
      
      Don't like ipv4 and route table.., it is not suited to
      make these subsytems belong to net namespace, Such as
      audit and crypto subsystems,they are more suitable to
      user namespace.
      
      So we must have the ability to make the netlink sockets
      in same user namespace can communicate with each other.
      
      This patch adds a new function pointer "compare" for
      netlink_table, we can decide if the netlink sockets can
      communicate with each other through this netlink_table
      self-defined compare function.
      
      The behavior isn't changed if we don't provide the compare
      function for netlink_table.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Acked-by: NSerge E. Hallyn <serge.hallyn@ubuntu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da12c90e
  5. 20 4月, 2013 1 次提交
  6. 22 3月, 2013 1 次提交