1. 20 Nov, 2018 36 commits
  2. 19 Nov, 2018 4 commits
    • David S. Miller's avatar
      Merge branch 'sctp-add-subscribe-per-asoc-and-sockopt-SCTP_EVENT' · cfc6731d
      David S. Miller authored
      Xin Long says:
      
      ====================
      sctp: add subscribe per asoc and sockopt SCTP_EVENT
      
      This patchset mainly adds the Event Subscription sockopt described in
      rfc6525#section-6.2:
      
      "Subscribing to events as described in [RFC6458] uses a setsockopt()
      call with the SCTP_EVENT socket option.  This option takes the
      following structure, which specifies the association, the event type
      (using the same value found in the event type field), and an on/off
      boolean.
      
        struct sctp_event {
          sctp_assoc_t se_assoc_id;
          uint16_t     se_type;
          uint8_t      se_on;
        };
      
      The user fills in the se_type field with the same value found in the
      strreset_type field, i.e., SCTP_STREAM_RESET_EVENT.  The user will
      also fill in the se_assoc_id field with either the association to set
      this event on (this field is ignored for one-to-one style sockets) or
      one of the reserved constant values defined in [RFC6458].  Finally,
      the se_on field is set with a 1 to enable the event or a 0 to disable
      the event."
      
      As for the old SCTP_EVENTS Option with struct sctp_event_subscribe,
      it's being DEPRECATED.
      
      v1->v2:
        - fix some key word in changelog that triggerred the filters at
          vger.kernel.org.
      v2->v3:
        - fix an array out of bounds noticed by Neil in patch 1/4.
      ====================
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfc6731d
    • Xin Long's avatar
      sctp: add sockopt SCTP_EVENT · 480ba9c1
      Xin Long authored
      This patch adds sockopt SCTP_EVENT described in rfc6525#section-6.2.
      With this sockopt users can subscribe to an event from a specified
      asoc.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      480ba9c1
    • Xin Long's avatar
      sctp: rename enum sctp_event to sctp_event_type · 88ee48c1
      Xin Long authored
      sctp_event is a structure name defined in RFC for sockopt
      SCTP_EVENT. To avoid the conflict, rename it.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88ee48c1
    • Xin Long's avatar
      sctp: add subscribe per asoc · a1e3a059
      Xin Long authored
      The member subscribe should be per asoc, so that sockopt SCTP_EVENT
      in the next patch can subscribe a event from one asoc only.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1e3a059