1. 29 5月, 2009 1 次提交
    • P
      wimax: Add netlink interface to get device state · 7f0333eb
      Paulius Zaleckas 提交于
      wimax connection manager / daemon has to know what is current
      state of the device. Previously it was only possible to get
      notification whet state has changed.
      
      Note:
      
       By mistake, the new generic netlink's number for
       WIMAX_GNL_OP_STATE_GET was declared inserting into the existing list
       of API calls, not appending; thus, it'd break existing API.
      
       Fixed by Inaky Perez-Gonzalez <inaky@linux.intel.com> by moving to
       the tail, where we add to the interface, not modify the interface.
      
       Thanks to Stephen Hemminger <shemminger@vyatta.com> for catching this.
      Signed-off-by: NPaulius Zaleckas <paulius.zaleckas@teltonika.lt>
      7f0333eb
  2. 07 5月, 2009 1 次提交
    • I
      wimax: oops: wimax_dev_add() is the only one that can initialize the state · 94c7f2d4
      Inaky Perez-Gonzalez 提交于
      When a new wimax_dev is created, it's state has to be __WIMAX_ST_NULL
      until wimax_dev_add() is succesfully called. This allows calls into
      the stack that happen before said time to be rejected.
      
      Until now, the state was being set (by mistake) to UNINITIALIZED,
      which was allowing calls such as wimax_report_rfkill_hw() to go
      through even when a call to wimax_dev_add() had failed; that was
      causing an oops when touching uninitialized data.
      
      This situation is normal when the device starts reporting state before
      the whole initialization has been completed. It just has to be dealt
      with.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      94c7f2d4
  3. 06 2月, 2009 1 次提交
    • P
      netlink: change return-value logic of netlink_broadcast() · ff491a73
      Pablo Neira Ayuso 提交于
      Currently, netlink_broadcast() reports errors to the caller if no
      messages at all were delivered:
      
      1) If, at least, one message has been delivered correctly, returns 0.
      2) Otherwise, if no messages at all were delivered due to skb_clone()
         failure, return -ENOBUFS.
      3) Otherwise, if there are no listeners, return -ESRCH.
      
      With this patch, the caller knows if the delivery of any of the
      messages to the listeners have failed:
      
      1) If it fails to deliver any message (for whatever reason), return
         -ENOBUFS.
      2) Otherwise, if all messages were delivered OK, returns 0.
      3) Otherwise, if no listeners, return -ESRCH.
      
      In the current ctnetlink code and in Netfilter in general, we can add
      reliable logging and connection tracking event delivery by dropping the
      packets whose events were not successfully delivered over Netlink. Of
      course, this option would be settable via /proc as this approach reduces
      performance (in terms of filtered connections per seconds by a stateful
      firewall) but providing reliable logging and event delivery (for
      conntrackd) in return.
      
      This patch also changes some clients of netlink_broadcast() that
      may report ENOBUFS errors via printk. This error handling is not
      of any help. Instead, the userspace daemons that are listening to
      those netlink messages should resync themselves with the kernel-side
      if they hit ENOBUFS.
      
      BTW, netlink_broadcast() clients include those that call
      cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
      internally call netlink_broadcast() and return its error value.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff491a73
  4. 30 1月, 2009 1 次提交
  5. 08 1月, 2009 1 次提交