On 12.12, leroy christophe wrote: > Le 12/12/2014 16:25, Patrick McHardy a écrit : > >On 12.12, leroy christophe wrote: > >>Le 12/12/2014 12:55, Arturo Borrero Gonzalez a écrit : > >>>On 12 December 2014 at 12:07, leroy christophe <christophe.leroy@xxxxxx> wrote: > >>I'm not sure what I proposed it the correct patch, maybe it shall be fixed > >>earlier in the chain, I don't know. > >Yeah, I'm not so sure myself. > > > >Could you please try what happens if you do: > > > >... tcp dport 222 redir :tcp dport > > > >Which should redirect to the same port, but I'm interested if it > >actually does that. > > > Without my patch, I get the following. Note the strange value in the DPT on > the second line. > > [ 61.377273] redirIN=eth0 OUT= > MAC=08:00:51:20:44:5b:08:00:27:fe:42:1e:08:00 SRC=172.25.231.37 > DST=172.25.231.5 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=29122 DF PROTO=TCP > SPT=55626 DPT=222 WINDOW=14600 RES=0x00 SYN URGP=0 > [ 61.377816] rejected IN=eth0 OUT= > MAC=08:00:51:20:44:5b:08:00:27:fe:42:1e:08:00 SRC=172.25.231.37 > DST=172.25.231.5 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=29122 DF PROTO=TCP > SPT=55626 DPT=20 WINDOW=14600 RES=0x00 SYN URGP=0 Strange, not sure why it is 20. > With my patch, I get correct port. > > [ 511.994597] redirIN=eth0 OUT= > MAC=08:00:51:20:44:5b:08:00:27:fe:42:1e:08:00 SRC=172.25.231.37 > DST=172.25.231.5 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=21300 DF PROTO=TCP > SPT=55622 DPT=222 WINDOW=14600 RES=0x00 SYN URGP=0 > [ 511.994999] rejected IN=eth0 OUT= > MAC=08:00:51:20:44:5b:08:00:27:fe:42:1e:08:00 SRC=172.25.231.37 > DST=172.25.231.5 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=21300 DF PROTO=TCP > SPT=55622 DPT=222 WINDOW=14600 RES=0x00 SYN URGP=0 Thanks! I'll have another look later, but it seems your patch is fine. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html