Commit 3ac8e7a7 authored by Stephane Glondu's avatar Stephane Glondu

Imported Upstream version 0.53

parent 58ec50d2
8 December 2011: ahcpd 0.53
* Fixed a longstanding bug that would cause a client to immediately
deconfigure itself after successfully renewing a lease.
* Set AHCP packets' TOS field as network control (thanks to Dave Taht).
28 July 2011: ahcpd 0.52
* Port to OpenBSD, by Vincent Gross.
......
File mode changed from 100644 to 100755
......@@ -35,6 +35,7 @@ THE SOFTWARE.
#include <sys/socket.h>
#include <sys/uio.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <net/if.h>
......@@ -380,9 +381,6 @@ main(int argc, char **argv)
#define SWITCH(new) \
do { \
assert(!!config_data == (new == STATE_BOUND || \
new == STATE_RENEWING_UNICAST || \
new == STATE_RENEWING)); \
debugf(2, "Switching to state %d.\n", new); \
state = new; \
if(state == STATE_IDLE || state == STATE_BOUND) \
......@@ -969,6 +967,7 @@ ahcp_socket(int port)
int s, rc;
int saved_errno;
int one = 1, zero = 0;
const int ds = 0xc0; /* CS6 - Network Control */
s = socket(PF_INET6, SOCK_DGRAM, 0);
if(s < 0)
......@@ -995,6 +994,15 @@ ahcp_socket(int port)
perror("setsockopt(IPV6_V6ONLY)");
#endif
#ifdef IPV6_TCLASS
rc = setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &ds, sizeof(ds));
#else
rc = -1;
errno = ENOSYS;
#endif
if (rc < 0)
perror("setsockopt(IPV6_TCLASS)");
rc = fcntl(s, F_GETFD, 0);
if(rc < 0)
goto fail;
......
......@@ -548,6 +548,7 @@ parse_message(int configure, const unsigned char *data, int len,
config_data->origin = config->origin;
config_data->origin_m = config->origin_m;
config_data->expires = config->expires;
config_data->expires_m = config->expires_m;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment