NEAT-project / neat

A New, Evolutive API and Transport-Layer Architecture for the Internet
https://www.neat-project.org/
BSD 3-Clause "New" or "Revised" License
65 stars 19 forks source link

Added support for tproxy property #433

Closed trozensztrauch closed 6 years ago

trozensztrauch commented 6 years ago

For the purpose of transparent proxing, this PR adds a possibility to specify 'tproxy' property (true/false) for a listening flow. When such a property is specified IP_TRANSPARENT socket option is set for underlying socket, which allows the socket to accept connections for non-local IPs.

weinrank commented 6 years ago
[  4%] Building C object CMakeFiles/neat-static.dir/neat_addr.c.o
/usr/home/buildbot/bbs-neat/freebsd-head/build/neat_core.c:5849:28: error: use of undeclared identifier 'SOL_IP'
        if (setsockopt(fd, SOL_IP, IP_TRANSPARENT, &enable, sizeof(int)) != 0) {
                           ^
/usr/home/buildbot/bbs-neat/freebsd-head/build/neat_core.c:5849:36: error: use of undeclared identifier 'IP_TRANSPARENT'
        if (setsockopt(fd, SOL_IP, IP_TRANSPARENT, &enable, sizeof(int)) != 0) {
                                   ^
/usr/home/buildbot/bbs-neat/freebsd-head/build/neat_core.c:5849:28: error: use of undeclared identifier 'SOL_IP'
        if (setsockopt(fd, SOL_IP, IP_TRANSPARENT, &enable, sizeof(int)) != 0) {
                           ^
/usr/home/buildbot/bbs-neat/freebsd-head/build/neat_core.c:5849:36: error: use of undeclared identifier 'IP_TRANSPARENT'
        if (setsockopt(fd, SOL_IP, IP_TRANSPARENT, &enable, sizeof(int)) != 0) {
                                   ^

Can you fix it?