1. 23 7月, 2008 31 次提交
  2. 22 7月, 2008 9 次提交
    • D
      tcp: Fix bitmask test in tcp_syn_options() · b32d1310
      David S. Miller 提交于
      As reported by Alexey Dobriyan:
      
      	  CHECK   net/ipv4/tcp_output.c
      	net/ipv4/tcp_output.c:475:7: warning: dubious: !x & y
      
      And sparse is damn right!
      
      	if (unlikely(!OPTION_TS & opts->options))
      		    ^^^
      		size += TCPOLEN_SACKPERM_ALIGNED;
      
      OPTION_TS is (1 << 1), so condition will never trigger.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b32d1310
    • D
      ipv6: __KERNEL__ ifdef struct ipv6_devconf · ebb36a97
      David S. Miller 提交于
      Based upon a report by Olaf Hering.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebb36a97
    • G
      udplite: Protection against coverage value wrap-around · 47112e25
      Gerrit Renker 提交于
      This patch clamps the cscov setsockopt values to a maximum of 0xFFFF.
      
      Setsockopt values greater than 0xffff can cause an unwanted
      wrap-around.  Further, IPv6 jumbograms are not supported (RFC 3838,
      3.5), so that values greater than 0xffff are not even useful.
      
      Further changes: fixed a typo in the documentation.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47112e25
    • A
      net: Print the module name as part of the watchdog message · 6579e57b
      Arjan van de Ven 提交于
      As suggested by Dave:
      
      This patch adds a function to get the driver name from a struct net_device,
      and consequently uses this in the watchdog timeout handler to print as 
      part of the message. 
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6579e57b
    • S
      net: use kcalloc in netdev_queue alloc · 7943986c
      Stephen Hemminger 提交于
      Minor nit, use size_t for allocation size and kcalloc to allocate
      an array. Probably makes no actual code difference.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7943986c
    • S
      ipv6: use timer pending · 847499ce
      Stephen Hemminger 提交于
      This fixes the bridge reference count problem and cleanups ipv6 FIB
      timer management.  Don't use expires field, because it is not a proper
      way to test, instead use timer_pending().
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      847499ce
    • I
      mac80211_hwsim.c: fix: BUG: unable to handle kernel NULL pointer dereference at 0000000000000370 · 3a33cc10
      Ian Schram 提交于
      I was looking at this out of interest, but I'm in no way familiar with
      the code.
      
      Looks to me that the error handling code in mac80211_hwsim is awkward.
      Which leads to it calling ieee80211_unregister_hw even when
      ieee80211_register_hw failed.
      
      The function has a for loop where it generates all simulated radios.
      when something fails, the error handling will call mac80211_hwsim_free
      which frees all simulated radios who's pointer isn't zero. However the
      information stored is insufficient to determine whether or not the call
      to ieee80211_register_hw succeeded or not for a specific radio. The
      included patch makes init_mac80211_hwsim clean up the current simulated
      radio, and then calls into mac80211_hwsim_free to clean up all the
      radios that did succeed.
      
      This however doesn't explain why the rate control registration failed..
      build tested this, but had some problems reproducing the original
      problem.
      Signed-off-by: NIan Schram <ischram@telenet.be>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a33cc10
    • P
      netfilter: nf_conntrack_sctp: fix sparse warnings · 5547cd0a
      Patrick McHardy 提交于
      Introduced by a258860e (netfilter: ctnetlink: add full support for SCTP to ctnetlink):
      
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: incorrect type in argument 1 (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:483:2:    expected unsigned int [unsigned] [usertype] x
      net/netfilter/nf_conntrack_proto_sctp.c:483:2:    got restricted unsigned int const <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: incorrect type in argument 1 (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:487:2:    expected unsigned int [unsigned] [usertype] x
      net/netfilter/nf_conntrack_proto_sctp.c:487:2:    got restricted unsigned int const <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:532:42: warning: incorrect type in assignment (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:532:42:    expected restricted unsigned int <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:532:42:    got unsigned int
      net/netfilter/nf_conntrack_proto_sctp.c:534:39: warning: incorrect type in assignment (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:534:39:    expected restricted unsigned int <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:534:39:    got unsigned int
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5547cd0a
    • H
      netfilter: nf_nat_sip: c= is optional for session · c71529e4
      Herbert Xu 提交于
      According to RFC2327, the connection information is optional
      in the session description since it can be specified in the
      media description instead.
      
      My provider does exactly that and does not provide any connection
      information in the session description.  As a result the new
      kernel drops all invite responses.
      
      This patch makes it optional as documented.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c71529e4