projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78a8ac6
)
Set default DHCP port if user has "port = 0"
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 2 Sep 2015 13:41:21 +0000
(09:41 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Wed, 2 Sep 2015 13:41:50 +0000
(09:41 -0400)
src/main/listen.c
patch
|
blob
|
history
diff --git
a/src/main/listen.c
b/src/main/listen.c
index
3d17396
..
4ab9c19
100644
(file)
--- a/
src/main/listen.c
+++ b/
src/main/listen.c
@@
-2357,6
+2357,17
@@
static int listen_bind(rad_listen_t *this)
break;
#endif
+#ifdef WITH_DHCP
+ case RAD_LISTEN_DHCP:
+ svp = getservbyname ("bootps", "udp");
+ if (svp != NULL) {
+ sock->my_port = ntohs(svp->s_port);
+ } else {
+ sock->my_port = 67;
+ }
+ break;
+#endif
+
default:
WARN("Internal sanity check failed in binding to socket. Ignoring problem");
return -1;