summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r--accel-pppd/ipv6/dhcpv6.c8
-rw-r--r--accel-pppd/ipv6/dhcpv6.h2
-rw-r--r--accel-pppd/ipv6/nd.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c
index 471e0a0..cc7f1f3 100644
--- a/accel-pppd/ipv6/dhcpv6.c
+++ b/accel-pppd/ipv6/dhcpv6.c
@@ -43,7 +43,7 @@ static int conf_route_via_gw = 1;
static struct in6_addr conf_dns[MAX_DNS_COUNT];
static int conf_dns_count;
-static void *conf_dnssl;
+static uint8_t *conf_dnssl;
static int conf_dnssl_size;
struct dhcpv6_pd {
@@ -53,7 +53,7 @@ struct dhcpv6_pd {
struct dhcpv6_opt_clientid *clientid;
uint32_t addr_iaid;
uint32_t dp_iaid;
- int dp_active:1;
+ unsigned int dp_active:1;
};
static void *pd_key;
@@ -908,14 +908,14 @@ static uint64_t parse_serverid(const char *opt)
uint16_t u16[4];
} __packed u;
- int n[4];
+ unsigned int n[4];
int i;
if (sscanf(opt, "%x:%x:%x:%x", &n[0], &n[1], &n[2], &n[3]) != 4)
goto err;
for (i = 0; i < 4; i++) {
- if (n[i] < 0 || n[i] > 0xffff)
+ if (n[i] > 0xffff)
goto err;
u.u16[i] = htons(n[i]);
}
diff --git a/accel-pppd/ipv6/dhcpv6.h b/accel-pppd/ipv6/dhcpv6.h
index 669155a..32ee715 100644
--- a/accel-pppd/ipv6/dhcpv6.h
+++ b/accel-pppd/ipv6/dhcpv6.h
@@ -182,7 +182,7 @@ struct dhcpv6_packet {
struct list_head relay_list;
- int rapid_commit:1;
+ unsigned int rapid_commit:1;
struct list_head opt_list;
void *endptr;
diff --git a/accel-pppd/ipv6/nd.c b/accel-pppd/ipv6/nd.c
index a4233b5..943ed6d 100644
--- a/accel-pppd/ipv6/nd.c
+++ b/accel-pppd/ipv6/nd.c
@@ -28,7 +28,7 @@ static int conf_init_ra_interval = 3;
static int conf_rdnss_lifetime;
static struct in6_addr conf_dns[MAX_DNS_COUNT];
static int conf_dns_count;
-static void *conf_dnssl;
+static uint8_t *conf_dnssl;
static int conf_dnssl_size;
static int conf_MaxRtrAdvInterval = 600;
@@ -196,7 +196,7 @@ static void ipv6_nd_send_ra(struct ipv6_nd_handler_t *h, struct sockaddr_in6 *ds
dnsslinfo->nd_opt_dnssli_lifetime = htonl(conf_rdnss_lifetime);
memcpy(dnsslinfo->nd_opt_dnssli, conf_dnssl, conf_dnssl_size);
memset(dnsslinfo->nd_opt_dnssli + conf_dnssl_size, 0, (dnsslinfo->nd_opt_dnssli_len - 1) * 8 - conf_dnssl_size);
- endptr = (void *)dnsslinfo + dnsslinfo->nd_opt_dnssli_len * 8;
+ endptr = (uint8_t *)dnsslinfo + dnsslinfo->nd_opt_dnssli_len * 8;
} else
endptr = rdnss_addr;