Permalink
Browse files

fixed remote_port in dhcp server

  • Loading branch information...
1 parent c233ae5 commit fd83e217db3554de4f5f7b06b3abf8befe3f1f0d @gnocuil committed Dec 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 dhcp/server/dhcpd.c
View
@@ -589,8 +589,10 @@ main(int argc, char **argv) {
}
}
- if (local_family == AF_INET || local_family == AF_MAX) {
- remote_port = htons(ntohs(local_port) );//[pset]
+ if (local_family == AF_INET) {
+ remote_port = htons(ntohs(local_port) + 1);
+ else if (local_family == AF_MAX) {//[pset]
+ remote_port = htons(ntohs(local_port) );
} else {
/* INSIST(local_family == AF_INET6); */
ent = getservbyname("dhcpv6-client", "udp");

0 comments on commit fd83e21

Please sign in to comment.