* REDIRECT changes DST address of the packet
@ 2005-06-30 7:07 Venkata Narayana
0 siblings, 0 replies; 17+ messages in thread
From: Venkata Narayana @ 2005-06-30 7:07 UTC (permalink / raw)
To: netfilter
Hello,
I am new to this mailing list sorry If I ask any thing
wrong.
My question is if I use REDIRECT action in PREROUTINg
rule is it going to change the tcp packet DST address.
If I lose original DST address, how can I persist that
value in that packet.
Help me !!!
Thanks in advance.
Nari.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* REDIRECT changes DST address of the packet
@ 2005-06-30 7:27 Venkata Narayana
2005-06-30 8:08 ` Krzysztof Oledzki
2005-06-30 11:09 ` Jan Engelhardt
0 siblings, 2 replies; 17+ messages in thread
From: Venkata Narayana @ 2005-06-30 7:27 UTC (permalink / raw)
To: netfilter-devel
Hello,
My question is if I use REDIRECT action in
NAT PREROUTING table is it going to change the tcp
packet DST address.
If I lose original DST address, how can I persist
that value in that packet.
Can you give information how the packet is getting
converted in this scenario.
Thanks in advance.
Nari.
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* REDIRECT changes DST address of the packet
@ 2005-06-30 7:29 Venkata Narayana
2005-06-30 7:46 ` George Alexandru Dragoi
2005-07-05 15:46 ` Jason Lunz
0 siblings, 2 replies; 17+ messages in thread
From: Venkata Narayana @ 2005-06-30 7:29 UTC (permalink / raw)
To: netfilter
Hello,
I am new to this mailing list sorry If I ask any
thing wrong.
My question is if I use REDIRECT action in
PREROUTINg
rule is it going to change the tcp packet DST
address.
If I lose original DST address, how can I persist
that
value in that packet.
Help me !!!
Thanks in advance.
Nari.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 7:29 REDIRECT changes DST address of the packet Venkata Narayana
@ 2005-06-30 7:46 ` George Alexandru Dragoi
2005-07-05 15:46 ` Jason Lunz
1 sibling, 0 replies; 17+ messages in thread
From: George Alexandru Dragoi @ 2005-06-30 7:46 UTC (permalink / raw)
To: Venkata Narayana; +Cc: netfilter
Yes, it is changed to a local address i think (or loopback one). The
original address is restored after routing by NAT system to packets
which comes back (as source address).
> If I lose original DST address, how can I persist
> that
> value in that packet.
Well, i didn't quite get this last worry of you.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 7:27 Venkata Narayana
@ 2005-06-30 8:08 ` Krzysztof Oledzki
2005-06-30 10:11 ` Peter Surda
2005-06-30 11:09 ` Jan Engelhardt
1 sibling, 1 reply; 17+ messages in thread
From: Krzysztof Oledzki @ 2005-06-30 8:08 UTC (permalink / raw)
To: Venkata Narayana; +Cc: netfilter-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 370 bytes --]
On Thu, 30 Jun 2005, Venkata Narayana wrote:
>
> Hello,
>
> My question is if I use REDIRECT action in
> NAT PREROUTING table is it going to change the tcp
> packet DST address.
>
> If I lose original DST address, how can I persist
> that value in that packet.
Please use getsockopt() with SO_ORIGINAL_DST.
Best regards,
Krzysztof Olędzki
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 8:08 ` Krzysztof Oledzki
@ 2005-06-30 10:11 ` Peter Surda
2005-07-02 4:15 ` Venkata Narayana
0 siblings, 1 reply; 17+ messages in thread
From: Peter Surda @ 2005-06-30 10:11 UTC (permalink / raw)
To: netfilter-devel
On Thu, 30 Jun 2005 10:08:55 +0200 (CEST) Krzysztof Oledzki <olenf@ans.pl>
wrote:
>> If I lose original DST address, how can I persist
>> that value in that packet.
>Please use getsockopt() with SO_ORIGINAL_DST.
Hehe you were faster than me :-).
Nari, if you don't understand how to do this, check out the source of some
transparent proxies (squid, p3scan) for examples (as Krzysztof said, grep for
SO_ORIGINAL_DST). I think it's straightforward, I even managed to reproduce this
in perl without using any C.
>Best regards,
> Krzysztof Olędzki
Yours sincerely,
Peter
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 7:27 Venkata Narayana
2005-06-30 8:08 ` Krzysztof Oledzki
@ 2005-06-30 11:09 ` Jan Engelhardt
2005-07-25 4:54 ` Venkata Narayana
1 sibling, 1 reply; 17+ messages in thread
From: Jan Engelhardt @ 2005-06-30 11:09 UTC (permalink / raw)
To: Venkata Narayana; +Cc: netfilter-devel
>Hello,
>
>My question is if I use REDIRECT action in
>NAT PREROUTING table is it going to change the tcp
>packet DST address.
>
>If I lose original DST address, how can I persist
>that value in that packet.
You can't really with PREROUTING (except of course, said getsockopt() call)
If you want to transparently redirect packets, you might want to use ROUTE or
TPROXY, depending on what you really want.
Jan Engelhardt
--
| Gesellschaft fuer Wissenschaftliche Datenverarbeitung Goettingen,
| Am Fassberg, 37077 Goettingen, www.gwdg.de
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 10:11 ` Peter Surda
@ 2005-07-02 4:15 ` Venkata Narayana
0 siblings, 0 replies; 17+ messages in thread
From: Venkata Narayana @ 2005-07-02 4:15 UTC (permalink / raw)
To: Peter Surda, netfilter-devel
Thanks Peter, Krzysztof and All,
I am able to get the original Destination address and
able to solve the problem.
Thanks once again.
Nari.
--- Peter Surda <shurdeek@routehat.org> wrote:
> On Thu, 30 Jun 2005 10:08:55 +0200 (CEST) Krzysztof
> Oledzki <olenf@ans.pl>
> wrote:
>
> >> If I lose original DST address, how can I persist
> >> that value in that packet.
> >Please use getsockopt() with SO_ORIGINAL_DST.
> Hehe you were faster than me :-).
>
> Nari, if you don't understand how to do this, check
> out the source of some
> transparent proxies (squid, p3scan) for examples (as
> Krzysztof said, grep for
> SO_ORIGINAL_DST). I think it's straightforward, I
> even managed to reproduce this
> in perl without using any C.
>
> >Best regards,
> > Krzysztof OlÄdzki
> Yours sincerely,
> Peter
>
>
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 7:29 REDIRECT changes DST address of the packet Venkata Narayana
2005-06-30 7:46 ` George Alexandru Dragoi
@ 2005-07-05 15:46 ` Jason Lunz
1 sibling, 0 replies; 17+ messages in thread
From: Jason Lunz @ 2005-07-05 15:46 UTC (permalink / raw)
To: netfilter
mesg2nari@yahoo.com said:
> I am new to this mailing list sorry If I ask any thing wrong.
>
> My question is if I use REDIRECT action in PREROUTINg rule is it
> going to change the tcp packet DST address.
>
> If I lose original DST address, how can I persist that value in that
> packet.
I think you're looking for the SO_ORIGINAL_DST sockopt.
Jason
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-06-30 11:09 ` Jan Engelhardt
@ 2005-07-25 4:54 ` Venkata Narayana
2005-07-25 23:59 ` Patrick McHardy
0 siblings, 1 reply; 17+ messages in thread
From: Venkata Narayana @ 2005-07-25 4:54 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Hi,
Thanks,
I am able to get the original dst address when I am
using tcp connection.
How can I get with UDP???
I my case of UDP we bind to single
fd and all packets irrespective of original
destination get delivered to same fd.
Thanks,
Venkat.
--- Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> >Hello,
> >
> >My question is if I use REDIRECT action in
> >NAT PREROUTING table is it going to change the tcp
> >packet DST address.
> >
> >If I lose original DST address, how can I persist
> >that value in that packet.
>
> You can't really with PREROUTING (except of course,
> said getsockopt() call)
> If you want to transparently redirect packets, you
> might want to use ROUTE or
> TPROXY, depending on what you really want.
>
>
>
> Jan Engelhardt
>
> --
>
> | Gesellschaft fuer Wissenschaftliche
> Datenverarbeitung Goettingen,
> | Am Fassberg, 37077 Goettingen, www.gwdg.de
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-25 4:54 ` Venkata Narayana
@ 2005-07-25 23:59 ` Patrick McHardy
2005-07-26 0:20 ` Patrick McHardy
0 siblings, 1 reply; 17+ messages in thread
From: Patrick McHardy @ 2005-07-25 23:59 UTC (permalink / raw)
To: Venkata Narayana; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
Venkata Narayana wrote:
> Hi,
>
> Thanks,
> I am able to get the original dst address when I am
> using tcp connection.
> How can I get with UDP???
Does this patch help? It should make SO_ORIGINAL_DST usable
with UDP as well.
[-- Attachment #2: SO_ORIGINAL_DST-udp.diff --]
[-- Type: text/x-patch, Size: 1133 bytes --]
[NETFILTER]: Make SO_ORIGINAL_DST usable for UDP
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit f65e246c7c05b208494de20f38973393d6b30155
tree 6437e0491ba99ec326c59ca0ac65300c2f01a804
parent eb82d02518ac3a400663163995097749d91c7c4c
author Patrick McHardy <kaber@trash.net> Tue, 26 Jul 2005 01:58:27 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 26 Jul 2005 01:58:27 +0200
net/ipv4/netfilter/ip_conntrack_core.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1310,9 +1310,8 @@ getorigdst(struct sock *sk, int optval,
tuple.dst.u.tcp.port = inet->dport;
tuple.dst.protonum = IPPROTO_TCP;
- /* We only do TCP at the moment: is there a better way? */
- if (strcmp(sk->sk_prot->name, "TCP")) {
- DEBUGP("SO_ORIGINAL_DST: Not a TCP socket\n");
+ if (sk->sk_protocol != IPPROTO_TCP && sk->sk_protocol != IPPROTO_UDP) {
+ DEBUGP("SO_ORIGINAL_DST: Not a TCP/UDP socket\n");
return -ENOPROTOOPT;
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-25 23:59 ` Patrick McHardy
@ 2005-07-26 0:20 ` Patrick McHardy
2005-07-26 8:27 ` Venkata Narayana
2005-07-26 9:31 ` KOVACS Krisztian
0 siblings, 2 replies; 17+ messages in thread
From: Patrick McHardy @ 2005-07-26 0:20 UTC (permalink / raw)
To: Venkata Narayana; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
Patrick McHardy wrote:
> Venkata Narayana wrote:
>
>> I am able to get the original dst address when I am
>> using tcp connection.
>> How can I get with UDP???
>
> Does this patch help? It should make SO_ORIGINAL_DST usable
> with UDP as well.
>
> diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
> --- a/net/ipv4/netfilter/ip_conntrack_core.c
> +++ b/net/ipv4/netfilter/ip_conntrack_core.c
> @@ -1310,9 +1310,8 @@ getorigdst(struct sock *sk, int optval,
> tuple.dst.u.tcp.port = inet->dport;
> tuple.dst.protonum = IPPROTO_TCP;
Please try this patch instead, I missed the above line.
[-- Attachment #2: SO_ORIGINAL_DST-udp.diff --]
[-- Type: text/x-patch, Size: 1245 bytes --]
[NETFILTER]: Make SO_ORIGINAL_DST usable for UDP
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 59740eead041f1e9c22555a5107bf9ca98a780da
tree a4d80f970e9fa526bff6c173cfe6d5a0610279a4
parent eb82d02518ac3a400663163995097749d91c7c4c
author Patrick McHardy <kaber@trash.net> Tue, 26 Jul 2005 02:19:09 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 26 Jul 2005 02:19:09 +0200
net/ipv4/netfilter/ip_conntrack_core.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1308,11 +1308,10 @@ getorigdst(struct sock *sk, int optval,
tuple.src.u.tcp.port = inet->sport;
tuple.dst.ip = inet->daddr;
tuple.dst.u.tcp.port = inet->dport;
- tuple.dst.protonum = IPPROTO_TCP;
+ tuple.dst.protonum = sk->sk_protocol;
- /* We only do TCP at the moment: is there a better way? */
- if (strcmp(sk->sk_prot->name, "TCP")) {
- DEBUGP("SO_ORIGINAL_DST: Not a TCP socket\n");
+ if (sk->sk_protocol != IPPROTO_TCP && sk->sk_protocol != IPPROTO_UDP) {
+ DEBUGP("SO_ORIGINAL_DST: Not a TCP/UDP socket\n");
return -ENOPROTOOPT;
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-26 0:20 ` Patrick McHardy
@ 2005-07-26 8:27 ` Venkata Narayana
2005-07-26 9:31 ` KOVACS Krisztian
1 sibling, 0 replies; 17+ messages in thread
From: Venkata Narayana @ 2005-07-26 8:27 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
Thank you Patrick.
Here I'm using single fd wor multiple addresses. so
theoritically speaking it won't work with this... In
udp recvmsg function if we can get the address then
it sounds good.
If I am wrong sorry for that.
Thanks,
Venkat
--- Patrick McHardy <kaber@trash.net> wrote:
> Patrick McHardy wrote:
> > Venkata Narayana wrote:
> >
> >> I am able to get the original dst address when I
> am
> >> using tcp connection.
> >> How can I get with UDP???
> >
> > Does this patch help? It should make
> SO_ORIGINAL_DST usable
> > with UDP as well.
> >
> > diff --git
> a/net/ipv4/netfilter/ip_conntrack_core.c
> b/net/ipv4/netfilter/ip_conntrack_core.c
> > --- a/net/ipv4/netfilter/ip_conntrack_core.c
> > +++ b/net/ipv4/netfilter/ip_conntrack_core.c
> > @@ -1310,9 +1310,8 @@ getorigdst(struct sock *sk,
> int optval,
> > tuple.dst.u.tcp.port = inet->dport;
> > tuple.dst.protonum = IPPROTO_TCP;
>
> Please try this patch instead, I missed the above
> line.
> > [NETFILTER]: Make SO_ORIGINAL_DST usable for UDP
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
>
> ---
> commit 59740eead041f1e9c22555a5107bf9ca98a780da
> tree a4d80f970e9fa526bff6c173cfe6d5a0610279a4
> parent eb82d02518ac3a400663163995097749d91c7c4c
> author Patrick McHardy <kaber@trash.net> Tue, 26 Jul
> 2005 02:19:09 +0200
> committer Patrick McHardy <kaber@trash.net> Tue, 26
> Jul 2005 02:19:09 +0200
>
> net/ipv4/netfilter/ip_conntrack_core.c | 7
> +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/netfilter/ip_conntrack_core.c
> b/net/ipv4/netfilter/ip_conntrack_core.c
> --- a/net/ipv4/netfilter/ip_conntrack_core.c
> +++ b/net/ipv4/netfilter/ip_conntrack_core.c
> @@ -1308,11 +1308,10 @@ getorigdst(struct sock *sk,
> int optval,
> tuple.src.u.tcp.port = inet->sport;
> tuple.dst.ip = inet->daddr;
> tuple.dst.u.tcp.port = inet->dport;
> - tuple.dst.protonum = IPPROTO_TCP;
> + tuple.dst.protonum = sk->sk_protocol;
>
> - /* We only do TCP at the moment: is there a better
> way? */
> - if (strcmp(sk->sk_prot->name, "TCP")) {
> - DEBUGP("SO_ORIGINAL_DST: Not a TCP socket\n");
> + if (sk->sk_protocol != IPPROTO_TCP &&
> sk->sk_protocol != IPPROTO_UDP) {
> + DEBUGP("SO_ORIGINAL_DST: Not a TCP/UDP
> socket\n");
> return -ENOPROTOOPT;
> }
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-26 0:20 ` Patrick McHardy
2005-07-26 8:27 ` Venkata Narayana
@ 2005-07-26 9:31 ` KOVACS Krisztian
2005-07-26 9:51 ` Patrick McHardy
1 sibling, 1 reply; 17+ messages in thread
From: KOVACS Krisztian @ 2005-07-26 9:31 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
Hi,
2005-07-26, k keltezéssel 02.20-kor Patrick McHardy ezt írta:
> >> I am able to get the original dst address when I am
> >> using tcp connection.
> >> How can I get with UDP???
> >
> > Does this patch help? It should make SO_ORIGINAL_DST usable
> > with UDP as well.
> >
> > diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
> > --- a/net/ipv4/netfilter/ip_conntrack_core.c
> > +++ b/net/ipv4/netfilter/ip_conntrack_core.c
> > @@ -1310,9 +1310,8 @@ getorigdst(struct sock *sk, int optval,
> > tuple.dst.u.tcp.port = inet->dport;
> > tuple.dst.protonum = IPPROTO_TCP;
Patrick, I'm afraid this is not enough for a full-featured UDP
solution. If you're using a single socket to receive UDP packets sent to
multiple original addresses this approach simply fails. A better
solution would require receiving the original destination address in a
per-packet manner.
We're using something similar as part of the transparent proxying
patchset, but unfortunately this requires enlarging the skb and is a
little hackish. The patch introduces an IP_RECVORIGADDRS socket option.
If you enable this sockopt on a UDP socket, then recvmsg() will return
the original addresses as a control message.
--
Regards,
Krisztian Kovacs
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-26 9:31 ` KOVACS Krisztian
@ 2005-07-26 9:51 ` Patrick McHardy
2005-07-26 10:06 ` KOVACS Krisztian
2005-08-01 14:24 ` Venkata Narayana
0 siblings, 2 replies; 17+ messages in thread
From: Patrick McHardy @ 2005-07-26 9:51 UTC (permalink / raw)
To: KOVACS Krisztian; +Cc: netfilter-devel
KOVACS Krisztian wrote:
> Patrick, I'm afraid this is not enough for a full-featured UDP
> solution. If you're using a single socket to receive UDP packets sent to
> multiple original addresses this approach simply fails. A better
> solution would require receiving the original destination address in a
> per-packet manner.
You're right, it doesn't work for unconnected sockets. I'm looking into
other possibilities now. I'm thinking of something similar to
SIOCGSTAMP - altough this would require increasing the size of struct
sock.
> We're using something similar as part of the transparent proxying
> patchset, but unfortunately this requires enlarging the skb and is a
> little hackish. The patch introduces an IP_RECVORIGADDRS socket option.
> If you enable this sockopt on a UDP socket, then recvmsg() will return
> the original addresses as a control message.
Why does the skb need to be enlarged?
Regards
Patrick
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-26 9:51 ` Patrick McHardy
@ 2005-07-26 10:06 ` KOVACS Krisztian
2005-08-01 14:24 ` Venkata Narayana
1 sibling, 0 replies; 17+ messages in thread
From: KOVACS Krisztian @ 2005-07-26 10:06 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
Hi,
2005-07-26, k keltezéssel 11.51-kor Patrick McHardy ezt írta:
> > We're using something similar as part of the transparent proxying
> > patchset, but unfortunately this requires enlarging the skb and is a
> > little hackish. The patch introduces an IP_RECVORIGADDRS socket option.
> > If you enable this sockopt on a UDP socket, then recvmsg() will return
> > the original addresses as a control message.
>
> Why does the skb need to be enlarged?
To store the original address (it's stored in IPCB(skb)). Hmm, now
that you say, actually I'm not sure you have to enlarge it. At the
moment struct inet_skb_parm is small enough, so we might be able to put
the original address information into skb->cb. I'm not sure what would
be the right location for such information, however.
--
Regards,
Krisztian Kovacs
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: REDIRECT changes DST address of the packet
2005-07-26 9:51 ` Patrick McHardy
2005-07-26 10:06 ` KOVACS Krisztian
@ 2005-08-01 14:24 ` Venkata Narayana
1 sibling, 0 replies; 17+ messages in thread
From: Venkata Narayana @ 2005-08-01 14:24 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
Hello Patric/Krisztian,
As Mr Krisztian suggested I was able to patch the
2.6.11 kernel with tproxy but trying to use
IP_RECVORIGADDRS socket option on udp socket. If it is
natted traffic I am unable to receive the message.
Can you suggest the alternative mechanism to get the
original DSt address in UDP transaction.
Thanks,
Venkat.
--- Patrick McHardy <kaber@trash.net> wrote:
> KOVACS Krisztian wrote:
>
> > Patrick, I'm afraid this is not enough for a
> full-featured UDP
> > solution. If you're using a single socket to
> receive UDP packets sent to
> > multiple original addresses this approach simply
> fails. A better
> > solution would require receiving the original
> destination address in a
> > per-packet manner.
>
> You're right, it doesn't work for unconnected
> sockets. I'm looking into
> other possibilities now. I'm thinking of something
> similar to
> SIOCGSTAMP - altough this would require increasing
> the size of struct
> sock.
>
> > We're using something similar as part of the
> transparent proxying
> > patchset, but unfortunately this requires
> enlarging the skb and is a
> > little hackish. The patch introduces an
> IP_RECVORIGADDRS socket option.
> > If you enable this sockopt on a UDP socket, then
> recvmsg() will return
> > the original addresses as a control message.
>
> Why does the skb need to be enlarged?
>
> Regards
> Patrick
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2005-08-01 14:24 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-30 7:29 REDIRECT changes DST address of the packet Venkata Narayana
2005-06-30 7:46 ` George Alexandru Dragoi
2005-07-05 15:46 ` Jason Lunz
-- strict thread matches above, loose matches on Subject: below --
2005-06-30 7:27 Venkata Narayana
2005-06-30 8:08 ` Krzysztof Oledzki
2005-06-30 10:11 ` Peter Surda
2005-07-02 4:15 ` Venkata Narayana
2005-06-30 11:09 ` Jan Engelhardt
2005-07-25 4:54 ` Venkata Narayana
2005-07-25 23:59 ` Patrick McHardy
2005-07-26 0:20 ` Patrick McHardy
2005-07-26 8:27 ` Venkata Narayana
2005-07-26 9:31 ` KOVACS Krisztian
2005-07-26 9:51 ` Patrick McHardy
2005-07-26 10:06 ` KOVACS Krisztian
2005-08-01 14:24 ` Venkata Narayana
2005-06-30 7:07 Venkata Narayana
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.