1. 13 4月, 2008 1 次提交
    • P
      [DCCP]: Fix skb->cb conflicts with IP · 028b0275
      Patrick McHardy 提交于
      dev_queue_xmit() and the other IP output functions expect to get a skb
      with clear or properly initialized skb->cb. Unlike TCP and UDP, the
      dccp_skb_cb doesn't contain a struct inet_skb_parm at the beginning,
      so the DCCP-specific data is interpreted by the IP output functions.
      This can cause false negatives for the conditional POST_ROUTING hook
      invocation, making the packet bypass the hook.
      
      Add a inet_skb_parm/inet6_skb_parm union to the beginning of
      dccp_skb_cb to avoid clashes. Also add a BUILD_BUG_ON to make
      sure it fits in the cb.
      
      [ Combined with patch from Gerrit Renker to remove two now unnecessary
        memsets of IPCB(skb)->opt ]
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      028b0275
  2. 29 1月, 2008 6 次提交
  3. 11 10月, 2007 5 次提交
  4. 26 4月, 2007 1 次提交
  5. 10 3月, 2007 1 次提交
  6. 01 3月, 2007 1 次提交
  7. 11 2月, 2007 1 次提交
  8. 26 1月, 2007 1 次提交
  9. 12 12月, 2006 3 次提交
  10. 03 12月, 2006 10 次提交
    • G
      [DCCP]: Use `unsigned' for packet lengths · 6b57c93d
      Gerrit Renker 提交于
      This patch implements a suggestion by Ian McDonald and
      
       1) Avoids tests against negative packet lengths by using unsigned int
          for packet payload lengths in the CCID send_packet()/packet_sent() routines
      
       2) As a consequence, it removes an now unnecessary test with regard to `len > 0'
          in ccid3_hc_tx_packet_sent: that condition is always true, since
            * negative packet lengths are avoided
            * ccid3_hc_tx_send_packet flags an error whenever the payload length is 0.
              As a consequence, ccid3_hc_tx_packet_sent is never called as all errors
              returned by ccid_hc_tx_send_packet are caught in dccp_write_xmit
      
       3) Removes the third argument of ccid_hc_tx_send_packet (the `len' parameter),
          since it is currently always set to skb->len. The code is updated with regard
          to this parameter change.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      6b57c93d
    • G
      [DCCP]: Simplified conditions due to use of enum:8 states · 59348b19
      Gerrit Renker 提交于
      This reaps the benefit of the earlier patch, which changed the type of
      CCID 3 states to use enums, in that many conditions are now simplified
      and the number of possible (unexpected) values is greatly reduced.
      
      In a few instances, this also allowed to simplify pre-conditions; where
      care has been taken to retain logical equivalence.
      
      [DCCP]: Introduce a consistent BUG/WARN message scheme
      
      This refines the existing set of DCCP messages so that
       * BUG(), BUG_ON(), WARN_ON() have meaningful DCCP-specific counterparts
       * DCCP_CRIT (for severe warnings) is not rate-limited
       * DCCP_WARN() is introduced as rate-limited wrapper
      
      Using these allows a faster and cleaner transition to their original
      counterparts once the code has matured into a full DCCP implementation.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      59348b19
    • G
      [DCCP]: Miscellaneous code tidy-ups · 09dbc389
      Gerrit Renker 提交于
      This patch does not change code; it performs some trivial clean/tidy-ups:
      
        * removal of a `debug_prefix' string in favour of the
          already existing dccp_role(sk)
      
        * add documentation of structures and constants
      
        * separated out the cases for invalid packets (step 1
          of the packet validation)
      
        * removing duplicate statements
      
        * combining declaration & initialisation
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      09dbc389
    • G
      [TCP/DCCP]: Introduce net_xmit_eval · b9df3cb8
      Gerrit Renker 提交于
      Throughout the TCP/DCCP (and tunnelling) code, it often happens that the
      return code of a transmit function needs to be tested against NET_XMIT_CN
      which is a value that does not indicate a strict error condition.
      
      This patch uses a macro for these recurring situations which is consistent
      with the already existing macro net_xmit_errno, saving on duplicated code.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      b9df3cb8
    • G
      [DCCPv6]: Choose a genuine initial sequence number · d7f7365f
      Gerrit Renker 提交于
      This
      	* resolves a FIXME - DCCPv6 connections started all with
      	  an initial sequence number of 1;
      	* provides a redirection `secure_dccpv6_sequence_number'
      	  in case the init_sequence_v6 code should be updated later;
      	* concentrates the update of S.GAR into dccp_connect_init();
      	* removes a duplicate dccp_update_gss() in ipv4.c;
      	* uses inet->dport instead of usin->sin_port, due to the
      	  following assignment in dccp_v4_connect():
       		inet->dport = usin->sin_port;
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      d7f7365f
    • G
      e11d9d30
    • G
      [DCCP]: Support for partial checksums (RFC 4340, sec. 9.2) · 6f4e5fff
      Gerrit Renker 提交于
      This patch does the following:
        a) introduces variable-length checksums as specified in [RFC 4340, sec. 9.2]
        b) provides necessary socket options and documentation as to how to use them
        c) basic support and infrastructure for the Minimum Checksum Coverage feature
           [RFC 4340, sec. 9.2.1]: acceptability tests, user notification and user
           interface
      
      In addition, it
      
       (1) fixes two bugs in the DCCPv4 checksum computation:
       	* pseudo-header used checksum_len instead of skb->len
      	* incorrect checksum coverage calculation based on dccph_x
       (2) removes dccp_v4_verify_checksum() since it reduplicates code of the
           checksum computation; code calling this function is updated accordingly.
       (3) now uses skb_checksum(), which is safer than checksum_partial() if the
           sk_buff has is a non-linear buffer (has pages attached to it).
       (4) fixes an outstanding TODO item:
              * If P.CsCov is too large for the packet size, drop packet and return.
      
      The code has been tested with applications, the latest version of tcpdump now
      comes with support for partial DCCP checksums.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      6f4e5fff
    • I
      [DCCP]: Fix logfile overflow · f45b3ec4
      Ian McDonald 提交于
      This patch fixes data being spewed into the logs continually. As the
      code stood if there was a large queue and long delays timeo would go
      down to zero and never get reset.
      
      This fixes it by resetting timeo. Put constant into header as well.
      Signed-off-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      f45b3ec4
    • G
      [DCCP]: Combine allocating & zeroing header space on skb · 9b42078e
      Gerrit Renker 提交于
      This is a code simplification:
      it combines three often recurring operations into one inline function,
      
              * allocate `len' bytes header space in skb
              * fill these `len' bytes with zeroes
              * cast the start of this header space as dccp_hdr
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      9b42078e
    • D
      [TCP]: Don't set SKB owner in tcp_transmit_skb(). · 93173112
      David S. Miller 提交于
      The data itself is already charged to the SKB, doing
      the skb_set_owner_w() just generates a lot of noise and
      extra atomics we don't really need.
      
      Lmbench improvements on lat_tcp are minimal:
      
      before:
      TCP latency using localhost: 23.2701 microseconds
      TCP latency using localhost: 23.1994 microseconds
      TCP latency using localhost: 23.2257 microseconds
      
      after:
      TCP latency using localhost: 22.8380 microseconds
      TCP latency using localhost: 22.9465 microseconds
      TCP latency using localhost: 22.8462 microseconds
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93173112
  11. 23 9月, 2006 1 次提交
  12. 01 7月, 2006 1 次提交
  13. 21 3月, 2006 7 次提交
  14. 04 1月, 2006 1 次提交