mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-11 01:06:49 +08:00
Compare commits
3 Commits
b1edb7780f
...
4599f551de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4599f551de | ||
|
|
41a36098b3 | ||
|
|
e7ab7e0773 |
@ -223,9 +223,10 @@ autoip_conflict_callback(struct netif *netif, acd_callback_enum_t state)
|
|||||||
autoip_restart(netif);
|
autoip_restart(netif);
|
||||||
break;
|
break;
|
||||||
case ACD_DECLINE:
|
case ACD_DECLINE:
|
||||||
/* "delete" conflicting address so a new one will be selected in
|
/* "delete" conflicting address and increment tried addr so a new one
|
||||||
* autoip_start() */
|
* will be selected in autoip_start() */
|
||||||
ip4_addr_set_any(&autoip->llipaddr);
|
ip4_addr_set_any(&autoip->llipaddr);
|
||||||
|
autoip->tried_llipaddr++;
|
||||||
autoip_stop(netif);
|
autoip_stop(netif);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -831,6 +831,8 @@ dhcp_start(struct netif *netif)
|
|||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* clear the flags, the rest is cleared below */
|
||||||
|
dhcp->flags = 0;
|
||||||
/* store this dhcp client in the netif */
|
/* store this dhcp client in the netif */
|
||||||
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
|
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
|
||||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp\n"));
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp\n"));
|
||||||
|
|||||||
@ -1993,17 +1993,17 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* TCP timestamp option with valid length */
|
/* TCP timestamp option with valid length */
|
||||||
tsval = tcp_get_next_optbyte();
|
tsval = (tcp_get_next_optbyte() << 24);
|
||||||
tsval |= (tcp_get_next_optbyte() << 8);
|
|
||||||
tsval |= (tcp_get_next_optbyte() << 16);
|
tsval |= (tcp_get_next_optbyte() << 16);
|
||||||
tsval |= (tcp_get_next_optbyte() << 24);
|
tsval |= (tcp_get_next_optbyte() << 8);
|
||||||
|
tsval |= tcp_get_next_optbyte();
|
||||||
if (flags & TCP_SYN) {
|
if (flags & TCP_SYN) {
|
||||||
pcb->ts_recent = lwip_ntohl(tsval);
|
pcb->ts_recent = tsval;
|
||||||
/* Enable sending timestamps in every segment now that we know
|
/* Enable sending timestamps in every segment now that we know
|
||||||
the remote host supports it. */
|
the remote host supports it. */
|
||||||
tcp_set_flags(pcb, TF_TIMESTAMP);
|
tcp_set_flags(pcb, TF_TIMESTAMP);
|
||||||
} else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno + tcplen)) {
|
} else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno + tcplen)) {
|
||||||
pcb->ts_recent = lwip_ntohl(tsval);
|
pcb->ts_recent = tsval;
|
||||||
}
|
}
|
||||||
/* Advance to next option (6 bytes already read) */
|
/* Advance to next option (6 bytes already read) */
|
||||||
tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6;
|
tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user