diff options
| author | Roy Marples <roy@marples.name> | 2011-12-15 03:22:47 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2011-12-15 03:22:47 +0000 |
| commit | 7be4b9b31f24a5fae8430774fd161f553a6653b5 (patch) | |
| tree | c347a836a637e5ae5fe2e5d9a019bd0200af9e94 /ipv6rs.c | |
| parent | 93b871dce1d809fef57aefea2b3c60a3fcb1bc03 (diff) | |
| download | dhcpcd-7be4b9b31f24a5fae8430774fd161f553a6653b5.tar.xz | |
Fix warnings on Linux
Diffstat (limited to 'ipv6rs.c')
| -rw-r--r-- | ipv6rs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -259,7 +259,7 @@ ipv6rs_handledata(_unused void *arg) struct icmp6_hdr *icp; struct interface *ifp; const char *sfrom; - struct nd_router_advert *radvert; + struct nd_router_advert *nd_ra; struct nd_opt_prefix_info *pi; struct nd_opt_mtu *mtu; struct nd_opt_rdnss *rdnss; @@ -338,7 +338,6 @@ ipv6rs_handledata(_unused void *arg) syslog(LOG_INFO, "%s: Router Advertisement from %s", ifp->name, sfrom); delete_timeouts(ifp, NULL); - radvert = (struct nd_router_advert *)icp; for (rap = ifp->ras; rap; rap = rap->next) { if (memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr, @@ -356,7 +355,8 @@ ipv6rs_handledata(_unused void *arg) } get_monotonic(&rap->received); - rap->lifetime = ntohl(icp->icmp6_dataun.icmp6_un_data32); + nd_ra = (struct nd_router_advert *)icp; + rap->lifetime = ntohs(nd_ra->nd_ra_router_lifetime); len -= sizeof(struct nd_router_advert); p = ((uint8_t *)icp) + sizeof(struct nd_router_advert); |
