1. 02 3月, 2011 2 次提交
  2. 17 2月, 2011 2 次提交
    • J
      netfilter: ip6t_LOG: fix a flaw in printing the MAC · 0af320fb
      Joerg Marx 提交于
      The flaw was in skipping the second byte in MAC header due to increasing
      the pointer AND indexed access starting at '1'.
      Signed-off-by: NJoerg Marx <joerg.marx@secunet.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      0af320fb
    • F
      netfilter: tproxy: do not assign timewait sockets to skb->sk · d503b30b
      Florian Westphal 提交于
      Assigning a socket in timewait state to skb->sk can trigger
      kernel oops, e.g. in nfnetlink_log, which does:
      
      if (skb->sk) {
              read_lock_bh(&skb->sk->sk_callback_lock);
              if (skb->sk->sk_socket && skb->sk->sk_socket->file) ...
      
      in the timewait case, accessing sk->sk_callback_lock and sk->sk_socket
      is invalid.
      
      Either all of these spots will need to add a test for sk->sk_state != TCP_TIME_WAIT,
      or xt_TPROXY must not assign a timewait socket to skb->sk.
      
      This does the latter.
      
      If a TW socket is found, assign the tproxy nfmark, but skip the skb->sk assignment,
      thus mimicking behaviour of a '-m socket .. -j MARK/ACCEPT' re-routing rule.
      
      The 'SYN to TW socket' case is left unchanged -- we try to redirect to the
      listener socket.
      
      Cc: Balazs Scheidler <bazsi@balabit.hu>
      Cc: KOVACS Krisztian <hidden@balabit.hu>
      Signed-off-by: NFlorian Westphal <fwestphal@astaro.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      d503b30b
  3. 15 2月, 2011 1 次提交
  4. 09 2月, 2011 1 次提交
    • P
      netfilter: nf_conntrack: set conntrack templates again if we return NF_REPEAT · c3174286
      Pablo Neira Ayuso 提交于
      The TCP tracking code has a special case that allows to return
      NF_REPEAT if we receive a new SYN packet while in TIME_WAIT state.
      
      In this situation, the TCP tracking code destroys the existing
      conntrack to start a new clean session.
      
      [DESTROY] tcp      6 src=192.168.0.2 dst=192.168.1.2 sport=38925 dport=8000 src=192.168.1.2 dst=192.168.1.100 sport=8000 dport=38925 [ASSURED]
          [NEW] tcp      6 120 SYN_SENT src=192.168.0.2 dst=192.168.1.2 sport=38925 dport=8000 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=8000 dport=38925
      
      However, this is a problem for the iptables' CT target event filtering
      which will not work in this case since the conntrack template will not
      be there for the new session. To fix this, we reassign the conntrack
      template to the packet if we return NF_REPEAT.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      c3174286
  5. 01 2月, 2011 2 次提交
    • P
      netfilter: ecache: always set events bits, filter them later · 3db7e93d
      Pablo Neira Ayuso 提交于
      For the following rule:
      
      iptables -I PREROUTING -t raw -j CT --ctevents assured
      
      The event delivered looks like the following:
      
       [UPDATE] tcp      6 src=192.168.0.2 dst=192.168.1.2 sport=37041 dport=80 src=192.168.1.2 dst=192.168.1.100 sport=80 dport=37041 [ASSURED]
      
      Note that the TCP protocol state is not included. For that reason
      the CT event filtering is not very useful for conntrackd.
      
      To resolve this issue, instead of conditionally setting the CT events
      bits based on the ctmask, we always set them and perform the filtering
      in the late stage, just before the delivery.
      
      Thus, the event delivered looks like the following:
      
       [UPDATE] tcp      6 432000 ESTABLISHED src=192.168.0.2 dst=192.168.1.2 sport=37041 dport=80 src=192.168.1.2 dst=192.168.1.100 sport=80 dport=37041 [ASSURED]
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      3db7e93d
    • P
      netfilter: arpt_mangle: fix return values of checkentry · 9d0db8b6
      Pablo Neira Ayuso 提交于
      In 135367b8 "netfilter: xtables: change xt_target.checkentry return type",
      the type returned by checkentry was changed from boolean to int, but the
      return values where not adjusted.
      
      arptables: Input/output error
      
      This broke arptables with the mangle target since it returns true
      under success, which is interpreted by xtables as >0, thus
      returning EIO.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      9d0db8b6
  6. 25 1月, 2011 2 次提交
  7. 20 1月, 2011 3 次提交
  8. 19 1月, 2011 2 次提交
  9. 16 1月, 2011 3 次提交
  10. 14 1月, 2011 5 次提交
  11. 13 1月, 2011 3 次提交
  12. 12 1月, 2011 5 次提交
  13. 11 1月, 2011 7 次提交
  14. 10 1月, 2011 2 次提交