chiark
/
gitweb
/
~mdw
/
preload-hacks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
662746a
)
noip.c (do_implicit_bind): Handle `SAME' impbind entries properly.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 4 Jul 2018 17:40:30 +0000
(18:40 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 4 Jul 2018 17:40:30 +0000
(18:40 +0100)
For some reason this just got left out.
noip.c
patch
|
blob
|
blame
|
history
diff --git
a/noip.c
b/noip.c
index 8dac7e44b0e16206e1bbe533cb56e528f58d990b..345f3251d7c56d2e591fedee22b663e8b330e505 100644
(file)
--- a/
noip.c
+++ b/
noip.c
@@
-1127,7
+1127,10
@@
static int do_implicit_bind(int sk, const struct sockaddr *sa, unsigned f)
sockaddr_in_range_p(sa, &i->minaddr, &i->maxaddr)) {
D( fprintf(stderr, "noip(%d): match!\n", pid); )
addr.sa.sa_family = sa->sa_family;
- ipaddr_to_sockaddr(&addr.sa, &i->bindaddr);
+ switch (i->how) {
+ case EXPLICIT: ipaddr_to_sockaddr(&addr.sa, &i->bindaddr); break;
+ case SAME: copy_sockaddr(&addr.sa, sa); break;
+ }
port_to_sockaddr(&addr.sa, 0);
goto found;
}