Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674352
| From | "Jason A. Donenfeld" <Jason@zx2c4.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net/icmp: restore source address if packet is NATed |
| Date | 2017-06-26 01:00 +0200 |
| Message-ID | <tWoFA-2yd-15@gated-at.bofh.it> (permalink) |
| References | <tVIQ1-1SY-7@gated-at.bofh.it> <tWhXr-6Sh-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi David, On Sun, Jun 25, 2017 at 5:49 PM, David Miller <davem@davemloft.net> wrote: > This violates things on so many levels. Yes, indeed. > I think this kind of thing need to be hidden inside of netfilter, > it can do the rate limiting and stuff like that in the spot > where it makes the transformation and knows all of the original > addressing and ports. Indeed I'd prefer that, and I'll look again into trying to make that work. But when I tried last, it seemed like there were some insurmountable challenges. With the ratelimiting, the limit has already been applied to one IP -- the masqueraded one -- before netfilter even has a chance to act -- so that IP will already hit the ratelimits well before any additional one inside netfilter would. Then the issue of transformation: last I looked it seemed like icmp_send threw away a bit too much information to do the transformation entirely correctly, but I could be wrong, so I'll give it another look. Hopefully it winds up being as easy as just reverse-transforming ICMP's payload IP header. > > You definitely can't just rewrite header fields here either. The > SKB could be shared, for example. I was afraid of that. It's easy to rework this particular patch, though, if you're still interested in the crufty bolt on approach... But I think I should investigate the netfilter-only approach instead, as you suggested. Jason
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] net/icmp: restore source address if packet is NATed "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-24 04:20 +0200
Re: [PATCH] net/icmp: restore source address if packet is NATed David Miller <davem@davemloft.net> - 2017-06-25 17:50 +0200
Re: [PATCH] net/icmp: restore source address if packet is NATed "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-26 01:00 +0200
Re: [PATCH] net/icmp: restore source address if packet is NATed David Miller <davem@davemloft.net> - 2017-06-26 03:50 +0200
csiph-web