You need to sign in or sign up before continuing.
  1. 11 10月, 2007 3 次提交
  2. 15 9月, 2007 1 次提交
  3. 11 7月, 2007 3 次提交
    • P
      [UDP]: Fix length check. · 3be550f3
      Patrick McHardy 提交于
      Rémi Denis-Courmont wrote:
      > Right. By the way, shouldn't "len" rather be signed in there?
      > 
      > 		unsigned int len;
      > 
      > 		/* if we're overly short, let UDP handle it */
      > 		len = skb->len - sizeof(struct udphdr);
      > 		if (len <= 0)
      > 			goto udp;
      
      It should, but the < 0 case can't happen since __udp4_lib_rcv
      already makes sure that we have at least a complete UDP header.
      
      Anyways, this patch fixes it.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3be550f3
    • J
      [UDP]: Cleanup UDP encapsulation code · 067b207b
      James Chapman 提交于
      This cleanup fell out after adding L2TP support where a new encap_rcv
      funcptr was added to struct udp_sock. Have XFRM use the new encap_rcv
      funcptr, which allows us to move the XFRM encap code from udp.c into
      xfrm4_input.c.
      
      Make xfrm4_rcv_encap() static since it is no longer called externally.
      Signed-off-by: NJames Chapman <jchapman@katalix.com>
      Acked-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      067b207b
    • J
      [UDP]: Introduce UDP encapsulation type for L2TP · 342f0234
      James Chapman 提交于
      This patch adds a new UDP_ENCAP_L2TPINUDP encapsulation type for UDP
      sockets. When a UDP socket's encap_type is UDP_ENCAP_L2TPINUDP, the
      skb is delivered to a function pointed to by the udp_sock's
      encap_rcv funcptr. If the skb isn't wanted by L2TP, it returns >0, which
      causes it to be passed through to UDP.
      
      Include padding to put the new encap_rcv field on a 4-byte boundary.
      
      Previously, the only user of UDP encap sockets was ESP, so when
      CONFIG_XFRM was not defined, some of the encap code was compiled
      out. This patch changes that. As a result, udp_encap_rcv() will
      now do a little more work when CONFIG_XFRM is not defined.
      Signed-off-by: NJames Chapman <jchapman@katalix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      342f0234
  4. 08 6月, 2007 1 次提交
  5. 04 6月, 2007 1 次提交
  6. 11 5月, 2007 1 次提交
  7. 09 5月, 2007 1 次提交
  8. 01 5月, 2007 2 次提交
  9. 30 4月, 2007 1 次提交
    • E
      [PATCH] INET : IPV4 UDP lookups converted to a 2 pass algo · 6aaf47fa
      Eric Dumazet 提交于
      Some people want to have many UDP sockets, binded to a single port but
      many different addresses. We currently hash all those sockets into a
      single chain.  Processing of incoming packets is very expensive,
      because the whole chain must be examined to find the best match.
      
      I chose in this patch to hash UDP sockets with a hash function that
      take into account both their port number and address : This has a
      drawback because we need two lookups : one with a given address, one
      with a wildcard (null) address.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6aaf47fa
  10. 26 4月, 2007 11 次提交
  11. 08 3月, 2007 1 次提交
  12. 11 2月, 2007 2 次提交
  13. 09 2月, 2007 1 次提交
  14. 23 12月, 2006 1 次提交
    • D
      [UDP]: Fix reversed logic in udp_get_port(). · 5c668704
      David S. Miller 提交于
      When this code was converted to use sk_for_each() the
      logic for the "best hash chain length" code was reversed,
      breaking everything.
      
      The original code was of the form:
      
      			size = 0;
      			do {
      				if (++size >= best_size_so_far)
      					goto next;
      			} while ((sk = sk->next) != NULL);
      			best_size_so_far = size;
      			best = result;
      		next:;
      
      and this got converted into:
      
      			sk_for_each(sk2, node, head)
      				if (++size < best_size_so_far) {
      					best_size_so_far = size;
      					best = result;
      				}
      
      Which does something very very different from the original.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c668704
  15. 03 12月, 2006 7 次提交
  16. 26 11月, 2006 1 次提交
  17. 04 10月, 2006 1 次提交
  18. 29 9月, 2006 1 次提交