All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pekka Pietikäinen" <pp@ee.oulu.fi>
To: edumazet@google.com, netfilter-devel@vger.kernel.org
Subject: netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag causes behavioural change in userspace?
Date: Tue, 22 Oct 2013 16:33:48 +0300	[thread overview]
Message-ID: <52667EBC.5010709@ee.oulu.fi> (raw)

After a kernel update to 3.11 (feat. commit 
681f130f39e10087475383e6771b9366e26bab0c) my "generate fake tcp 
connections from random ip addresses" app broke, test case as simple as 
running (on default gw of victim):

s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.setsockopt(socket.SOL_IP, socket.IP_TRANSPARENT, 1)

s.bind(("5.5.5.5",6666))
s.connect(("192.168.122.46",22))

---

ip route flush table 100
ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100

---

*mangle
-N DIVERT
-A DIVERT -j MARK --set-mark 1
-A DIVERT -j ACCEPT
-A PREROUTING -p tcp -m socket -j DIVERT

and the 3-way handshake never finishes. Without -m socket (or with the 
new --nowildcard) it does.

Bug, feature or end-user cluelessness? (no problem fixing my ruleset, 
but it's still a behaviourial change :P )


             reply	other threads:[~2013-10-22 14:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 13:33 Pekka Pietikäinen [this message]
2013-10-24  8:28 ` netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag causes behavioural change in userspace? Jari Turkia
2013-10-24  9:52 ` Pablo Neira Ayuso
2013-10-24 10:15   ` Eric Dumazet
2013-10-24 11:21     ` Pekka Pietikäinen
2013-10-24 12:05       ` Eric Dumazet
2013-10-24 12:27         ` Pekka Pietikäinen
2013-10-24 12:51           ` Florian Westphal
     [not found]             ` <52691D4F.4080903@ee.oulu.fi>
     [not found]               ` <20131024132936.GC993@breakpoint.cc>
     [not found]                 ` <52695011.2060902@ee.oulu.fi>
2013-10-24 19:14                   ` Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52667EBC.5010709@ee.oulu.fi \
    --to=pp@ee.oulu.fi \
    --cc=edumazet@google.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.