Lines Matching refs:ia_na
33 bool ia_na : 1; member
284 static int dhcpv6_add_option_ia_na(struct net_pkt *pkt, struct dhcpv6_ia_na *ia_na, in dhcpv6_add_option_ia_na() argument
303 ret = net_pkt_write_be32(pkt, ia_na->iaid); in dhcpv6_add_option_ia_na()
308 ret = net_pkt_write_be32(pkt, ia_na->t1); in dhcpv6_add_option_ia_na()
313 ret = net_pkt_write_be32(pkt, ia_na->t2); in dhcpv6_add_option_ia_na()
328 ret = net_pkt_write(pkt, &ia_na->iaaddr.addr, sizeof(ia_na->iaaddr.addr)); in dhcpv6_add_option_ia_na()
333 ret = net_pkt_write_be32(pkt, ia_na->iaaddr.preferred_lifetime); in dhcpv6_add_option_ia_na()
338 ret = net_pkt_write_be32(pkt, ia_na->iaaddr.valid_lifetime); in dhcpv6_add_option_ia_na()
450 if (options->ia_na) { in dhcpv6_calculate_message_size()
516 if (options->ia_na) { in dhcpv6_add_options()
517 struct dhcpv6_ia_na ia_na = { in dhcpv6_add_options() local
522 memcpy(&ia_na.iaaddr.addr, &iface->config.dhcpv6.addr, in dhcpv6_add_options()
523 sizeof(ia_na.iaaddr.addr)); in dhcpv6_add_options()
526 ret = dhcpv6_add_option_ia_na(pkt, &ia_na, options->iaaddr); in dhcpv6_add_options()
626 .ia_na = iface->config.dhcpv6.params.request_addr, in dhcpv6_send_solicit()
652 .ia_na = iface->config.dhcpv6.params.request_addr, in dhcpv6_send_request()
678 .ia_na = iface->config.dhcpv6.params.request_addr, in dhcpv6_send_renew()
705 .ia_na = iface->config.dhcpv6.params.request_addr, in dhcpv6_send_rebind()
732 .ia_na = true, in dhcpv6_send_confirm()
914 struct dhcpv6_ia_na *ia_na) in dhcpv6_parse_option_ia_na() argument
923 ret = net_pkt_read_be32(pkt, &ia_na->iaid); in dhcpv6_parse_option_ia_na()
928 ret = net_pkt_read_be32(pkt, &ia_na->t1); in dhcpv6_parse_option_ia_na()
933 ret = net_pkt_read_be32(pkt, &ia_na->t2); in dhcpv6_parse_option_ia_na()
943 if (ia_na->t1 != 0 && ia_na->t2 != 0 && ia_na->t1 > ia_na->t2) { in dhcpv6_parse_option_ia_na()
947 NET_DBG("iaid %d t1 %d t2 %d", ia_na->iaid, ia_na->t1, ia_na->t2); in dhcpv6_parse_option_ia_na()
953 ia_na->iaaddr.status = DHCPV6_STATUS_NO_ADDR_AVAIL; in dhcpv6_parse_option_ia_na()
954 ia_na->status = DHCPV6_STATUS_SUCCESS; in dhcpv6_parse_option_ia_na()
973 &ia_na->iaaddr); in dhcpv6_parse_option_ia_na()
982 &ia_na->status); in dhcpv6_parse_option_ia_na()
1270 static int dhcpv6_find_ia_na(struct net_pkt *pkt, struct dhcpv6_ia_na *ia_na) in dhcpv6_find_ia_na() argument
1280 ret = dhcpv6_parse_option_ia_na(pkt, length, ia_na); in dhcpv6_find_ia_na()
1452 struct dhcpv6_ia_na ia_na = { 0 }; in dhcpv6_handle_advertise() local
1516 ret = dhcpv6_find_ia_na(pkt, &ia_na); in dhcpv6_handle_advertise()
1522 if (ia_na.status != DHCPV6_STATUS_SUCCESS || in dhcpv6_handle_advertise()
1523 ia_na.iaaddr.status != DHCPV6_STATUS_SUCCESS) { in dhcpv6_handle_advertise()
1569 struct dhcpv6_ia_na ia_na = { 0 }; in dhcpv6_handle_reply() local
1650 ret = dhcpv6_find_ia_na(pkt, &ia_na); in dhcpv6_handle_reply()
1656 if (iface->config.dhcpv6.addr_iaid != ia_na.iaid) { in dhcpv6_handle_reply()
1682 if (ia_na.status == DHCPV6_STATUS_NO_ADDR_AVAIL || in dhcpv6_handle_reply()
1683 ia_na.iaaddr.status == DHCPV6_STATUS_NO_ADDR_AVAIL || in dhcpv6_handle_reply()
1684 ia_na.iaaddr.valid_lifetime == 0) { in dhcpv6_handle_reply()
1697 &ia_na.iaaddr.addr)) { in dhcpv6_handle_reply()
1702 memcpy(&iface->config.dhcpv6.addr, &ia_na.iaaddr.addr, in dhcpv6_handle_reply()
1705 dhcvp6_update_deadlines(iface, now, ia_na.t1, ia_na.t2, in dhcpv6_handle_reply()
1706 ia_na.iaaddr.preferred_lifetime, in dhcpv6_handle_reply()
1707 ia_na.iaaddr.valid_lifetime); in dhcpv6_handle_reply()
1709 ifaddr = net_if_ipv6_addr_lookup_by_iface(iface, &ia_na.iaaddr.addr); in dhcpv6_handle_reply()
1712 ifaddr, ia_na.iaaddr.valid_lifetime); in dhcpv6_handle_reply()
1713 } else if (net_if_ipv6_addr_add(iface, &ia_na.iaaddr.addr, NET_ADDR_DHCP, in dhcpv6_handle_reply()
1714 ia_na.iaaddr.valid_lifetime) == NULL) { in dhcpv6_handle_reply()