sys/net/dhcpv6: fix requesting multiple prefixes
There were two subtle bugs that prevented the DHCPv6 client to request multiple prefixes for different interfaces. - `dhcpv6_client_req_ia_pd()` would fill up *all* leases with the same interface - `_parse_reply()` would return after parsing the first answer With this patch, `gnrc_border_router` gets a prefix on both interfaces of the at86rf215.
This commit is contained in:
parent
d00bde7750
commit
0e5595cffd
@ -155,6 +155,7 @@ void dhcpv6_client_req_ia_pd(unsigned netif, unsigned pfx_len)
|
|||||||
lease->parent.ia_id.info.netif = netif;
|
lease->parent.ia_id.info.netif = netif;
|
||||||
lease->parent.ia_id.info.type = DHCPV6_OPT_IA_PD;
|
lease->parent.ia_id.info.type = DHCPV6_OPT_IA_PD;
|
||||||
lease->pfx_len = pfx_len;
|
lease->pfx_len = pfx_len;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -662,7 +663,6 @@ static bool _parse_reply(uint8_t *rep, size_t len)
|
|||||||
lease->pfx_len, valid, pref
|
lease->pfx_len, valid, pref
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user