Skip to content

Commit a7b0ed9

Browse files
committed
initial bind support final
1 parent 49eee52 commit a7b0ed9

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

src/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ extern gethostbyaddr_t true_gethostbyaddr;
123123
typedef ssize_t (*send_t)(int, const void *, size_t, int);
124124
typedef ssize_t (*sendto_t)(int, const void *, size_t, int, const struct sockaddr, socklen_t);
125125
typedef ssize_t (*sendmsg_t)(int, const struct msghdr *, int);
126-
typedef int (*bind_t)(int, const struct sockaddr, socklen_t);
126+
typedef int (*bind_t)(int, const struct sockaddr *, socklen_t);
127127

128128
extern send_t true_send;
129129
extern sendto_t true_sendto;

src/libproxybound.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -483,21 +483,14 @@ int connect(int sock, const struct sockaddr *addr, socklen_t len) {
483483

484484
int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {
485485
PDEBUG("bind: got a bind request\n");
486-
PDEBUG("bind: got a bind request\n");
487-
PDEBUG("bind: got a bind request\n");
488-
PDEBUG("bind: got a bind request\n");
489-
PDEBUG("bind: got a bind request\n");
490-
PDEBUG("bind: got a bind request\n");
491-
PDEBUG("bind: got a bind request\n");
492-
PDEBUG("bind: got a bind request\n");
493486

494487
/* If the real bind doesn't exist, we're stuffed */
495488
if (true_bind == NULL) {
496489
PDEBUG("unresolved symbol: bind\n\n");
497490
return -1;
498491
}
499492

500-
return true_bind(sockfd, *addr, addrlen);
493+
return true_bind(sockfd, addr, addrlen);
501494
}
502495

503496
ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) {

0 commit comments

Comments
 (0)