1. 25 3月, 2008 3 次提交
  2. 23 3月, 2008 1 次提交
  3. 22 3月, 2008 1 次提交
    • P
      [NET]: NULL pointer dereference and other nasty things in /proc/net/(tcp|udp)[6] · 28518fc1
      Pavel Emelyanov 提交于
      Commits f40c81 ([NETNS][IPV4] tcp - make proc handle the network
      namespaces) and a91275 ([NETNS][IPV6] udp - make proc handle the
      network namespace) both introduced bad checks on sockets and tw
      buckets to belong to proper net namespace.
      
      I.e. when checking for socket to belong to given net and family the
      
      	do {
      		sk = sk_next(sk);
      	} while (sk && sk->sk_net != net && sk->sk_family != family);
      
      constructions were used. This is wrong, since as soon as the
      sk->sk_net fits the net the socket is immediately returned, even if it
      belongs to other family.
      
      As the result four /proc/net/(udp|tcp)[6] entries show wrong info.
      The udp6 entry even oopses when dereferencing inet6_sk(sk) pointer:
      
      static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket)
      {
      	...
              struct ipv6_pinfo *np = inet6_sk(sp);
      	...
      
              dest  = &np->daddr; /* will be NULL for AF_INET sockets */
      	...
      	seq_printf(...
      	           dest->s6_addr32[0], dest->s6_addr32[1],
                         dest->s6_addr32[2], dest->s6_addr32[3],
      	...
      
      Fix it by converting && to ||.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Acked-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28518fc1
  4. 21 3月, 2008 2 次提交
  5. 07 3月, 2008 1 次提交
    • D
      [UDP]: Revert udplite and code split. · db8dac20
      David S. Miller 提交于
      This reverts commit db1ed684 ("[IPV6]
      UDP: Rename IPv6 UDP files."), commit
      8be8af8f ("[IPV4] UDP: Move
      IPv4-specific bits to other file.") and commit
      e898d4db ("[UDP]: Allow users to
      configure UDP-Lite.").
      
      First, udplite is of such small cost, and it is a core protocol just
      like TCP and normal UDP are.
      
      We spent enormous amounts of effort to make udplite share as much code
      with core UDP as possible.  All of that work is less valuable if we're
      just going to slap a config option on udplite support.
      
      It is also causing build failures, as reported on linux-next, showing
      that the changeset was not tested very well.  In fact, this is the
      second build failure resulting from the udplite change.
      
      Finally, the config options provided was a bool, instead of a modular
      option.  Meaning the udplite code does not even get build tested
      by allmodconfig builds, and furthermore the user is not presented
      with a reasonable modular build option which is particularly needed
      by distribution vendors.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db8dac20
  6. 04 3月, 2008 2 次提交
  7. 01 2月, 2008 1 次提交
  8. 29 1月, 2008 13 次提交
  9. 07 11月, 2007 1 次提交
  10. 26 10月, 2007 1 次提交
  11. 19 10月, 2007 1 次提交
  12. 11 10月, 2007 3 次提交
  13. 15 9月, 2007 1 次提交
  14. 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
  15. 08 6月, 2007 1 次提交
  16. 04 6月, 2007 1 次提交
  17. 11 5月, 2007 1 次提交
  18. 09 5月, 2007 1 次提交
  19. 01 5月, 2007 2 次提交