mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, improved IPv6 address setting
Set IPv6 link local invalid before clearing it. Don't wait sif6up() to set the link local valid, netif_ip6_addr_set_state() is only an accessor function so it does not start any discovery whatsoever.
This commit is contained in:
parent
b23a6172ed
commit
7fce9346dc
@ -1011,7 +1011,8 @@ int sif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) {
|
|||||||
|
|
||||||
IN6_LLADDR_FROM_EUI64(ip6, our_eui64);
|
IN6_LLADDR_FROM_EUI64(ip6, our_eui64);
|
||||||
ip6_addr_copy(pcb->netif->ip6_addr[0], ip6);
|
ip6_addr_copy(pcb->netif->ip6_addr[0], ip6);
|
||||||
/* FIXME: add IPv6 static neighbor using his_eui64 */
|
netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_PREFERRED);
|
||||||
|
/* FIXME: should we add an IPv6 static neighbor using his_eui64 ? */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1023,6 +1024,7 @@ int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) {
|
|||||||
LWIP_UNUSED_ARG(our_eui64);
|
LWIP_UNUSED_ARG(our_eui64);
|
||||||
LWIP_UNUSED_ARG(his_eui64);
|
LWIP_UNUSED_ARG(his_eui64);
|
||||||
|
|
||||||
|
netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_INVALID);
|
||||||
ip6_addr_set_zero(&pcb->netif->ip6_addr[0]);
|
ip6_addr_set_zero(&pcb->netif->ip6_addr[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1032,8 +1034,6 @@ int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) {
|
|||||||
*/
|
*/
|
||||||
int sif6up(ppp_pcb *pcb) {
|
int sif6up(ppp_pcb *pcb) {
|
||||||
|
|
||||||
netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_PREFERRED);
|
|
||||||
|
|
||||||
pcb->if6_up = 1;
|
pcb->if6_up = 1;
|
||||||
pcb->err_code = PPPERR_NONE;
|
pcb->err_code = PPPERR_NONE;
|
||||||
netif_set_link_up(pcb->netif);
|
netif_set_link_up(pcb->netif);
|
||||||
|
Loading…
Reference in New Issue
Block a user