0

I use file remapping in TFTP to organize the files depending of the clients which will be needing them. Currently, all the files are in directories depending of the IP of the clients, and the corresponding rule is :

r .* \i/\0

But if I have N client with the same files, I'll have N directories identical. So I'd like to modify the rule, to have something like this : "IP in 192.168.1., you have the directory A ; IP in 192.168.2., you have B ; ...". Is it possible with TFTP (its regex are pretty basic, see here) ?

Shan-x
  • 1,146
  • 6
  • 19
  • 44

1 Answers1

0

\i is only parsed in the replacement field as the client IP and you have no way to modify the replacement field based on the content of \i then the answer is: No, it is not possible to do what you want "if you have no help from the requester side"

you could force the requester to include the requester's IP on the request itself, then you can use a regex to filter the incoming requests then replace them with the corresponding destination dir.

Pat
  • 2,670
  • 18
  • 27