Merge branch 'master' into ppp-new

This commit is contained in:
Sylvain Rochet
2013-04-25 00:36:12 +02:00
12 changed files with 28 additions and 15 deletions

View File

@@ -701,7 +701,7 @@ igmp_start_timer(struct igmp_group *group, u8_t max_time)
}
#ifdef LWIP_RAND
/* ensure the random value is > 0 */
group->timer = (LWIP_RAND() % (max_time - 1)) + 1;
group->timer = (LWIP_RAND() % max_time);
#endif /* LWIP_RAND */
}

View File

@@ -51,6 +51,7 @@
#include "lwip/netif.h"
#include "lwip/nd6.h"
#include "lwip/mld6.h"
#include "lwip/ip.h"
#include "lwip/stats.h"
#include <string.h>

View File

@@ -44,6 +44,7 @@
#include "lwip/ip6.h"
#include "lwip/icmp6.h"
#include "lwip/nd6.h"
#include "lwip/ip.h"
#include "lwip/pbuf.h"
#include "lwip/memp.h"

View File

@@ -50,6 +50,7 @@
#include "lwip/icmp6.h"
#include "lwip/ip6.h"
#include "lwip/ip6_addr.h"
#include "lwip/ip.h"
#include "lwip/inet_chksum.h"
#include "lwip/pbuf.h"
#include "lwip/netif.h"

View File

@@ -55,6 +55,7 @@
#include "lwip/netif.h"
#include "lwip/icmp6.h"
#include "lwip/mld6.h"
#include "lwip/ip.h"
#include "lwip/stats.h"
#include <string.h>

View File

@@ -719,7 +719,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p,
for (last = r; last->next != NULL; last = last->next);
SYS_ARCH_PROTECT(lev);
if(netif->loop_first != NULL) {
if (netif->loop_first != NULL) {
LWIP_ASSERT("if first != NULL, last must also be != NULL", netif->loop_last != NULL);
netif->loop_last->next = r;
netif->loop_last = last;
@@ -735,7 +735,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p,
#if LWIP_NETIF_LOOPBACK_MULTITHREADING
/* For multithreading environment, schedule a call to netif_poll */
tcpip_callback((tcpip_callback_fn)netif_poll, netif);
tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0);
#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */
return ERR_OK;

View File

@@ -1377,9 +1377,9 @@ void
tcp_keepalive(struct tcp_pcb *pcb)
{
struct pbuf *p;
#if CHECKSUM_GEN_TCP
#if CHECKSUM_GEN_TCP
struct tcp_hdr *tcphdr;
#endif /* CHECKSUM_GEN_TCP */
#endif /* CHECKSUM_GEN_TCP */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: sending KEEPALIVE probe to "));
ipX_addr_debug_print(PCB_ISIPV6(pcb), TCP_DEBUG, &pcb->remote_ip);
@@ -1394,12 +1394,12 @@ tcp_keepalive(struct tcp_pcb *pcb)
("tcp_keepalive: could not allocate memory for pbuf\n"));
return;
}
#if CHECKSUM_GEN_TCP
#if CHECKSUM_GEN_TCP
tcphdr = (struct tcp_hdr *)p->payload;
tcphdr->chksum = ipX_chksum_pseudo(PCB_ISIPV6(pcb), p, IP_PROTO_TCP, p->tot_len,
&pcb->local_ip, &pcb->remote_ip);
#endif /* CHECKSUM_GEN_TCP */
#endif /* CHECKSUM_GEN_TCP */
TCP_STATS_INC(tcp.xmit);
/* Send output to IP */