List of commits:
Subject Hash Author Date (UTC)
Restart accept interrupted by signal d84134f3193fd2d4c5298eaded8ffade5d74d220 Catalin(ux) M. BOIE 2014-11-11 06:57:12
Bump version to 0.12 ea1c70a262b706cd45f1eb98b6aa9805de300647 Catalin(ux) M. BOIE 2014-10-14 03:14:29
Added support to change poll timeout d0e5782e1fb0da5db1291b3c518486d3ac8dec97 Catalin(ux) M. BOIE 2014-10-14 03:13:58
Fixed strcmp on a NULL variable 59df6d596e3c842227f4f374b4b6635de3ce1c3e Catalin(ux) M. BOIE 2014-10-14 03:12:29
Added support for deny and fake for Kevin d9598fd2ca7886484b78512d71dbd29059720832 Catalin(ux) M. BOIE 2012-07-18 21:13:20
Log also the version in the log file. d5576baff697e87dfbbbcbfb77df4b364cee15a2 Catalin(ux) M. BOIE 2011-08-25 18:55:40
SOCK_DCCP is not defined on CentOS. :( 303830a06b80962e417c01d88cae6d50e9182662 Catalin(ux) M. BOIE 2011-08-25 09:46:09
More fixes for spec file 06d8c98718977c91419ffd6cabdd3e6bb57b8043 Catalin(ux) M. BOIE 2011-08-24 20:29:10
Added example for config file. 20becba1955981d5c3642e802031c08c25c701cf Catalin(ux) M. BOIE 2011-08-24 20:26:19
Bump version to 0.10. 9659780e6f025d10441c354eefe79e327a660c09 Catalin(ux) M. BOIE 2011-08-24 20:20:26
Ignore more files in repo. c1121dc5f6644043314880361c24fc2172326c02 Catalin(ux) M. BOIE 2011-08-24 20:20:00
Big fix for stuck programs. Stupid. f0ea19d9130bdc8851f08fb16a61a7be8da002cd Catalin(ux) M. BOIE 2011-08-24 20:19:56
More duilder updates 83d91834796de59a679545c25d62a423d6f04f0e Catalin(ux) M. BOIE 2011-08-24 20:17:33
More stuff added to TODO aaf5da40115dc3ee2562f42522468f5bd9362012 Catalin(ux) M. BOIE 2011-08-24 20:17:11
Corrected a merge problem. bb0ce0b8b1c869572d15babb81543154f0c5db39 Catalin(ux) M. BOIE 2011-08-24 03:41:36
Bump version to 0.9. 97343f56db715658dc0fbf6179db0d300c5d8545 Catalin(ux) M. BOIE 2011-08-24 03:37:36
Remove the need for SO_DOMAIN because we can get domain from accepting socket. a027bcfd13a15a98dd2a5db924af77199e156c7f Catalin(ux) M. BOIE 2011-08-10 20:19:38
SO_MARK may not be defined by glibc. 2204bbcf4b4480008cabc0e330f64460a8995255 Catalin(ux) M. BOIE 2011-08-10 20:08:43
Removed some debugging leftovers. 3b71558fc26d7958f83362926555c1f4100a57ab Catalin(ux) M. BOIE 2011-08-23 22:18:02
Spec files updates. 7a09b21c11b8d3c562544826c1fddb6009b16263 Catalin(ux) M. BOIE 2011-08-22 21:30:13
Commit d84134f3193fd2d4c5298eaded8ffade5d74d220 - Restart accept interrupted by signal
Author: Catalin(ux) M. BOIE
Author date (UTC): 2014-11-11 06:57
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2014-11-11 06:57
Parent(s): ea1c70a262b706cd45f1eb98b6aa9805de300647
Signing key:
Tree: 65b1a978aad9cf646c4d8a386f37114463557ccf
File Lines added Lines deleted
.gitignore 1 0
Makefile.in 2 1
TODO 3 2
configure 1 1
force_bind.c 10 3
test_poll.sh 5 4
File .gitignore changed (mode: 100644) (index 7e0257f..69a15ea)
... ... test_client6
10 10 *.out *.out
11 11 *.log *.log
12 12 force_bind_config.h force_bind_config.h
13 test_poll
File Makefile.in changed (mode: 100644) (index b881de1..dbec961)
... ... test_poll: test_poll.c
29 29 clean: clean:
30 30 @rm -f force_bind.so.* test_bind send_udp test_client test_client6 \ @rm -f force_bind.so.* test_bind send_udp test_client test_client6 \
31 31 *.a *.o *.so* $(PRJ)-*.rpm $(PRJ)-*-*-*.tgz $(PRJ)-*.tar.gz \ *.a *.o *.so* $(PRJ)-*.rpm $(PRJ)-*-*-*.tgz $(PRJ)-*.tar.gz \
32 *.strace *.log *.out
32 *.strace *.log *.out \
33 test_poll
33 34
34 35 install: all install: all
35 36 @mkdir -p $(I_USR_LIB) @mkdir -p $(I_USR_LIB)
File TODO changed (mode: 100644) (index ffddfcc..34189a5)
1 [ ] Clarify deny/fake for bind. It is only ipv4/ipv6?
1 2 [ ] Document force_poll_timeout [ ] Document force_poll_timeout
2 3 [ ] Split binding on connect from the one used for listen. [ ] Split binding on connect from the one used for listen.
3 4 [ ] If we have more bind calls, we have a problem. Probably we have to use a table like this: [ ] If we have more bind calls, we have a problem. Probably we have to use a table like this:
 
19 20 [ ] Dump statistics (bytes, syscalls etc.) in a file specified by a env var. [ ] Dump statistics (bytes, syscalls etc.) in a file specified by a env var.
20 21 [ ] Need to study how to set only the class for IPv6. Also check Linux kernel [ ] Need to study how to set only the class for IPv6. Also check Linux kernel
21 22 to see how prio is set for IPv6 class. to see how prio is set for IPv6 class.
22 [ ] Nice: Force a protocol on a connection! So, user tries TCP but get UDP!
23 [ ] Nice: Force a protocol on a connection! So, user tries TCP but gets UDP!
23 24 [ ] Controlling timeout (SO_RCVTIMEO, SO_SNDTIMEO) [ ] Controlling timeout (SO_RCVTIMEO, SO_SNDTIMEO)
24 25 [ ] Enforce connect timeout [ ] Enforce connect timeout
25 [ ] Change data on the fly...
26 [ ] Change data on the fly!!!
26 27 [ ] Allow saving stream data in a file. [ ] Allow saving stream data in a file.
27 28 [ ] sendmmsg/recvmmsg support [ ] sendmmsg/recvmmsg support
28 29 [ ] There are stupid applications (skype) that run poll with timeout 0! Fix it! [ ] There are stupid applications (skype) that run poll with timeout 0! Fix it!
File configure changed (mode: 100755) (index d33bb6c..92c4bc4)
1 1 #!/bin/bash #!/bin/bash
2 2
3 ./duilder
3 ./duilder "${@}"
File force_bind.c changed (mode: 100644) (index 6e89448..d0c3e3b)
... ... int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
1222 1222
1223 1223 xlog(2, "accept(sockfd=%d, ...)\n", sockfd); xlog(2, "accept(sockfd=%d, ...)\n", sockfd);
1224 1224
1225 new_sock = old_accept(sockfd, addr, addrlen);
1226 if (new_sock == -1)
1227 return -1;
1225 while (1) {
1226 new_sock = old_accept(sockfd, addr, addrlen);
1227 if (new_sock == -1) {
1228 if (errno == EINTR)
1229 continue;
1230 return -1;
1231 }
1232
1233 break;
1234 }
1228 1235
1229 1236 /* We must find out domain and type for accepting socket */ /* We must find out domain and type for accepting socket */
1230 1237 q = get(sockfd); q = get(sockfd);
File test_poll.sh copied from file test_fake.sh (similarity 50%) (mode: 100755) (index acf74df..c76f423)
4 4
5 5 ulimit -c2000000 ulimit -c2000000
6 6
7 export FORCE_BIND_ADDRESS_V4=fake
8 export FORCE_NET_LOG="test_fake.sh.log"
7 export FORCE_BIND_POLL_TIMEOUT=2000
9 8 export FORCE_NET_VERBOSE=1 export FORCE_NET_VERBOSE=1
9 export FORCE_NET_LOG="${0}.log"
10 10
11 11 export LD_PRELOAD="${LD_PRELOAD}:./force_bind.so" export LD_PRELOAD="${LD_PRELOAD}:./force_bind.so"
12 12
13 make test_bind
14 strace -f -s200 -o ${0}.strace ./test_bind 10000
13 make test_poll
14 #strace -f -s200 -o ${0}.strace ./test_poll
15 debug ./test_poll
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/force_bind

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/force_bind

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/force_bind

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main