Commit Graph

2555 Commits

Author SHA1 Message Date
goldsimon
fa73f130f1 tcp: fix bug #36167 again (fixed in 2014, but when calling shutdown(WR) followed by recv(), this still happened) 2017-11-17 21:06:49 +01:00
Axel Lin
40a563cdd3 dns: Use dns_backupserver_available() instead of open-coded
Slightly better readability by calling dns_backupserver_available()
instead of open-coded. Also move dns_backupserver_available() function
up to avoid forward declaration.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-11-16 19:48:35 +01:00
Axel Lin
d20a7aba0c netif: Use ip6_addr_isvalid() at appropriate places
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-11-16 19:48:24 +01:00
goldsimon
a73eb7ae72 pbuf.c: fix that pbuf_skip_const() was not prototyped for some configurations 2017-11-16 11:37:34 +01:00
Dirk Ziegelmeier
1fdc7571e0 Move DNS_MAX_RETRIES option from dns.c to opt.h 2017-11-13 22:52:39 +01:00
Dirk Ziegelmeier
2c1a152880 Fix bug #52239: if a DNS request is denied by a DNS server, this DNS request shouldn't be stopped if there is another DNS server to try
Apply improved version of Xiaodong Sun's patch
2017-11-13 22:51:08 +01:00
Dirk Ziegelmeier
a56ea1b19f dns.c: Rename goto label memerr to ignore_packet
Label is more descriptive this way
2017-11-13 22:37:38 +01:00
Dirk Ziegelmeier
a82054d24f Follow-up to patch #9472: tcp_kill_prio: Don't kill active connection that has the same priority
Correctly search for connection with lowest prio AND longest inactivity time
2017-11-13 22:13:11 +01:00
Joel Cunningham
637bce91b4 netif: ensure link and admin states are up in issue reports (bug #52353)
This fixes a bug where some callers of netif_issue_reports were not
checking that both link and admin states were up, leading to extraneous
reports when calling one of the following

 1) netif_set_ipaddr
 2) netif_ip6_addr_set_parts
 3) netif_ip6_addr_set_state

The bug has been fixed by placing link and admin state checks in
netif_issue_reports and not requiring the callers to perform this
checking
2017-11-08 13:38:48 -06:00
Dirk Ziegelmeier
d864f8c3a3 Fix bug #52368: Minor typo in comment
I think "Internet checksum functions" is OK
2017-11-08 19:52:40 +01:00
Axel Lin
a8acca5902 Trivial typo fix
s/chekc/check/g

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-07 13:44:43 +01:00
Joel Cunningham
a78dbb25c5 docs: small clean ups for last couple of commits:
* Fix typos in LWIP_NO_CTYPE_H comment block
 * Update comment around caller of tcp_kill_prio()
2017-11-06 09:37:10 -06:00
Dirk Ziegelmeier
d8b6cdffcb Apply patch #9472: tcp_kill_prio: Don't kill active connection that has the same priority
in a modified, IMHO more readable way.
2017-11-06 12:53:08 +01:00
Axel Lin
41cf4012af pbuf: Simplify pbuf_get_contiguous implementation
Use pbuf_skip_const() to simplify the implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-06 12:22:32 +01:00
Axel Lin
c1efb9e296 pbuf: Make pbuf_add_header/pbuf_remove_header return error if invalid parameters
It does not make sense to return success in p == NULL or
invalid header_size_increment/header_size_decrement cases. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-06 12:22:30 +01:00
Dirk Ziegelmeier
849dfb17c7 The macros in ip6_addr.c are duplicated from ip4_addr.c, so move them to lwIPs portability layer
...didn't see that in the first place...
2017-11-05 10:27:46 +01:00
Dirk Ziegelmeier
93f4245e89 ip6_addr.c: Convert several macros to private #defines
The macros are functions from ctype.h, but ctype.h declares them as functions, not as #defines
It makes no sense to abstract them in lwIPs portability layer, the functions are of low complexity and they are only used in this file.
2017-11-05 10:13:24 +01:00
Dirk Ziegelmeier
a9a3d473ac Make xchar() a private #define of ip6_addr.c, it is not standardized in any C header 2017-11-05 10:06:25 +01:00
Joel Cunningham
472f7985b5 Introduce LWIP_PACKED_CAST to fix error issue with ARMCC
ARMCC when using __packed structures will not implicitly convert a
pointer to a member of a packed structure to something which does not
have __packed. This results in a compiler error and was found with calls
to icmp6_param_problem

While there is a #pragma pack mode in ARMCC that disables this error, it
does require existing ports to switch over their packing mode and
perform integration
2017-11-01 09:05:06 -05:00
Dirk Ziegelmeier
08ec234127 Related to patch #9471: pbuf: Drop casting to u8_t for increment the reference count
Cast to correct type: Needed to avoid warnings about integer cast (-Wconversion)
SYS_ARCH_SET cannot be used here
2017-10-28 15:41:15 +02:00
Joel Cunningham
b953bd0393 docs: fix minor mis-spelling in sys.c 2017-10-27 15:33:18 -05:00
Joel Cunningham
b296d2c7bb docs: update tcp_kill_prio same priority comments
tcp_kill_prio will kill the oldest active connection of same/lower
priority. Update all comments so that it's clear the same priority
can be killed
2017-10-25 09:08:23 -05:00
Dirk Ziegelmeier
ddcf9cc764 Move all rawapi.txt to appropriate doxygen docs 2017-10-20 21:40:23 +02:00
Dirk Ziegelmeier
a8edee8268 Move all text from sys_arch.txt to appropriate doxygen places 2017-10-20 18:23:06 +02:00
Dirk Ziegelmeier
8a46a853d2 Improve system abstraction layer doxygen docs by moving documentation from sys_arch.txt to sys.c 2017-10-17 22:38:18 +02:00
Dirk Ziegelmeier
84b2a0f55b Remove raw API TCP/UDP function documentation from rawapi.txt - it is now integrated in doxygen docs.
This avoid having a second description for the same stuff that is "bit-rotting" because noone remembers to update this file.
Also remove outdated and misleading zero-copy TX information.
2017-10-17 21:59:34 +02:00
Dirk Ziegelmeier
d020bfc0df Improve UDP documentation using rawapi.txt texts 2017-10-17 21:50:18 +02:00
Dirk Ziegelmeier
001e1f1127 Improve lwIP doxygen documentation by copying several passages from rawapi.txt to the corresponding doxygen places 2017-10-16 23:24:52 +02:00
Dirk Ziegelmeier
921f601b5d Improve lwIP doxygen documentation by copying several passages from rawapi.txt to the corresponding function documentation 2017-10-16 23:14:28 +02:00
Joel Cunningham
de531131c5 Fix compiler warnings seen with clang 8.1.0 on MacOS
This fixes the following warnings:

test_tcp.c:266:5: error: code will never be executed [-Werror,-Wunreachable-code]
    pbuf_free(p);
    ^~~~~~~~~
 - The check API 'fail' aborts the test, thus pbuf_free(p) will never be executed

pbuf.c:783:111: error: format specifies type 'unsigned short' but the argument has type 'u8_t' (aka 'unsigned char') [-Werror,-Wformat]
      LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
 - LWIP_PBUF_REF_T is u8_t by default and doesn't match U16_F, so cast to u16_t. The cast and formatter will need to be changed
   if ref is larger than 16 bits

ethernet.c:105:16: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat]
               (unsigned)ethhdr->dest.addr[0], (unsigned)ethhdr->dest.addr[1], (unsigned)ethhdr->dest.addr[2],
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 - addr[] is type u8_t, formatter is X8_F which should be 8 bits. 'unsigned' is an int, so cast to unsighed char instead
2017-10-13 07:52:34 -05:00
goldsimon
8fc69c9858 Revert changes of 07434aa73a (accidentally committed local changes) 2017-10-06 11:45:10 +02:00
goldsimon
ad4358592a add MEM_SANITY_CHECK (behaves like MEMP_SANITY_CHECK) and ensure 'ram_end->prev' does not get changed 2017-09-26 22:30:18 +02:00
goldsimon
a61aee337b mem.c: beautify converting between struct mem and heap index (add ptr_to_mem/mem_to_ptr) 2017-09-26 22:13:44 +02:00
goldsimon
1710fc1a89 Fix a corner case of double-free in the heap 2017-09-25 22:29:02 +02:00
goldsimon
f058364d7f Added two simple unit tests for illegal calls to mem_free() 2017-09-25 21:38:00 +02:00
goldsimon
5e187bb8bc Tiny typo fix 2017-09-25 20:24:47 +02:00
Jens Nielsen
7115384b15 Clear seg->oversize_left after sending OK
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-25 20:21:17 +02:00
Our Air Quality
dbd726959c [PATCH] Replace the OOSEQ max bytes and pbufs constants with functions.
Some systems need to take into account an RX buffer pool size when
advising an appropriate number of RX pbufs to queue on the ooseq
list. For some systems there is a practical hard limit beyond which
the rx pool becomes exhausted blocking reception of further buffers
until some are freed.

It also helps to be able to consider the available dynamic memory when
advising an appropriate maximum number of bytes to buffer on the ooseq
list.

These decisions can also benefit from knowing the number already
allocated on a particular pcb, so the ooseq tcp segement is passed to
these functions. For example, if the system only wants to allow the
total number of rx pbufs queued on all the ooseq lists to grow by one
and a pcb already has two then it can return three for this call, but
might return one for another call - supporting a greedy allocation
strategy.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-21 10:36:21 +02:00
goldsimon
7dcc407c53 tcp_in: favour local variables over ifdef blocks 2017-09-21 10:12:36 +02:00
goldsimon
8f459cc242 Make TCP_OOSEQ_MAX_BYTES and TCP_OOSEQ_MAX_PBUFS work independently 2017-09-21 09:52:51 +02:00
goldsimon
6d2b181cc0 tcp_in: favour code block over #ifdef blocks for local variables only used in TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS configs 2017-09-21 09:50:47 +02:00
David Girault
f48c71e17f altcp_tcp: free altcp_pcb struct in altcp_tcp_close()
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-20 20:50:03 +02:00
Jisu Kim
6447a583e2 ipv6 ready: When there are more fragments(Mbit is not zero), payload_length field in IPV6 header must be the multiple of 8 (see patch #9455)
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-19 14:29:27 +02:00
Jisu Kim
fa11461f84 ipv6 ready: Added exception handling to parse a routing header (see patch #9455)
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-19 14:21:10 +02:00
Jisu Kim
675c6e4428 ipv6 ready: Hop-by-Hop and destination option header must be checked more detailed (see patch #9455)
Hop-by-Hop, Destination option header structures consist of 2 unsigned char; next option type and header length field.
And TLV(Type-Length-Value) option headers come by the number in header length field.
If the option type in TLV option header is not recognized and 2 MSB is not 0, it is handled as an exception.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-19 14:18:38 +02:00
Jisu Kim
72171c12b5 ipv6 ready: Hop-by-Hop and destination option header must be checked more detailed (see patch #9455)
Hop-by-Hop, Destination option header structures consist of 2 unsigned char; next option type and header length field.
And TLV(Type-Length-Value) option headers come by the number in header length field.
If the option type in TLV option header is not recognized and 2 MSB is not 0, it is handled as an exception.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-19 14:12:10 +02:00
Jisu Kim
acb4b60517 ipv6 ready: icmp6_param_problem() should send an exact offset to point to the error (see patch #9455)
For this, convert 'u8_t nexth' to a pointer and change 'icmp6_param_problem()' to take a pointer, not an offset number

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-19 14:11:30 +02:00
Jisu Kim
7b27df1b83 ipv6 ready: clean up ipv6 header structs and add more header types & defines (see patch #9455)
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-19 14:08:16 +02:00
Dirk Ziegelmeier
931b5e643c Reformat core code using astylerc 2017-09-17 20:38:38 +02:00
Dirk Ziegelmeier
8c59be74c1 Reformat IPv4 code using astylerc 2017-09-17 20:33:27 +02:00
Jisu Kim
bd94297115 icmp6_send_response() sends the pointer in network byte order (see patch #9455: IPv6 ready test on RFC2460)
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-16 22:46:42 +02:00
Jisu Kim
27b7ed17fc First step to passing IPV6 Ready test: time out IPv6 fragments after 60 seconds
(added IPV6_REASS_MAXAGE as an option that is independent of the IPv4 setting)

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-16 22:41:35 +02:00
goldsimon
14919e34a1 icmp_input: fix possibly unused variable (used for debug output only) 2017-09-15 11:44:22 +02:00
Jakub Schmidtke
b7e5de389e Fixed removing unneeded TCP SACKs
TCP SACKs were removed after some changes in the ooseq queue,
but before all unneeded packets were removed from it.
Because of that, we would sometimes include SACKs
for data already delivered in-order.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-09-09 21:51:13 +02:00
goldsimon
86abfbe087 Fix bug #51937 by checking TF_CLOSED at the end of all pcb callbacks in tcp_input() 2017-09-09 21:46:41 +02:00
goldsimon
a8ac37f419 refactor tcp_input a bit in preparation of a fix for bug #51937 2017-09-09 21:41:06 +02:00
Our Air Quality
dc7a9c8c37 tcp_in: correct some loops continuing without maintaining a prev pointer.
This problem would appear to have only affected systems with multiple
interfaces. It was noted causing tcp resets when the pcb was lost, and there
might have been other associated problems.

Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-09-04 07:48:37 +02:00
Joel Cunningham
28e519b72d tcp_output: move useg assignment to right before segment while loop
There were a couple cases in-between that could cause an exit from
tcp_output which don't use useg. With large send buffers, pcb->unacked
may be large and calculating useg is wasted in these exit cases

Some compilers may be re-ordering this already, but it doesn't hurt to
correctly arrange the code
2017-08-29 16:59:39 -05:00
goldsimon
1d4ca0bff6 Fix bug #51687 (tcp_close(): is it OK to return ERR_MEM if TF_CLOSEPEND is set?) 2017-08-28 21:59:05 +02:00
goldsimon
c7edfdf987 Fix bug #51765 and fix commit 90873d6: call tcp_rexmit_fast() more than once on dupacks since the actual transmission is guarded by TF_INFR, not by pcb->dupacks 2017-08-25 21:16:59 +02:00
Joel Cunningham
f582c88339 tcp: persist timer re-work (bug #50837)
This re-works the persist timer to have the following behavior:

  1) Only start persist timer when a buffered segment doesn't fit within
     the current window and there is no in-fligh data.  Previously, the
     persist timer was always started when the window went to zero even
     if there was no buffered data (since timer was managed in receive
     pathway rather than transmit pathway)
  2) Upon first fire of persist timer, fill the remaining window if
     non-zero by splitting the unsent segment.  If split segment is sent,
     persist timer is stopped, RTO timer is now ensuring reliable window
     updates
  3) If window is already zero when persist timer fires, send 1 byte probe
  4) Persist timer and zero window probe should only be active when the
     following are true:
       * no in-flight data (pcb->unacked == NULL)
       * when there is buffered data (pcb->unsent != NULL)
       * when pcb->unsent->len > pcb->snd_wnd
2017-08-25 09:35:10 -05:00
goldsimon
1ed1cfe83a TCP: simplify trimming left edge & use pbuf_remove_header() instead of pbuf_header() 2017-08-21 22:34:44 +02:00
goldsimon
bd8709bc82 Simplify pbuf_remove_header() a bit 2017-08-21 22:33:01 +02:00
goldsimon
3c5398403d fix pbuf_split_64k() for zero-length pbufs 2017-08-21 22:08:53 +02:00
Joel Cunningham
9844049cb1 lwip_itoa: fix converting 0 (bug #51729)
lwip_itoa would output the number 0 as \0.  This fixes the issue by
adding a special check before the normal conversion loop

This was found via shell cmd idxtoname and win32 port.  "lo0" should
be returned for index 1
2017-08-11 13:38:51 -05:00
Joel Cunningham
3d82155d29 tcp: use TCP_WND_INC for dupack > 3 case
TCP_WND_INC abstracts the rollover handling and allows the window to
reach it's maximum value
2017-08-09 16:28:55 -05:00
Joel Cunningham
b8a3cf3a4a tcp: use tcp_set_flags() rather than manually setting flag 2017-08-09 12:15:52 -05:00
Joel Cunningham
ba7a3204cb tcp: use tcp_ack_now rather than manually setting TF_ACK_NOW 2017-08-09 10:13:41 -05:00
goldsimon
90873d6c71 Continue fixing the spirit of bug #51663: don't change pcb state if retransmission can't be done because segments are still queued for transmission
- add a better-documented static function tcp_output_segment_busy
- try to reduce the number of checks
- tcp_rexmit_rto: iterate pcb->unacked only once
- no need to check for ref==1 in tcp_rexmit_fast when tcp_rexmit does
- call tcp_rexmit_fast if dupacks >= 3 (not == 3) and use TF_INFR flag to guard the fast-rexmit case (that way, it's triggered again on the next dupack)
2017-08-08 23:02:14 +02:00
Our Air Quality
6a01607004 tcp_out rto: delay re-transmission earlier if link writes are deferred.
There is already a guard in tcp_output_segment() for a pbuf still being
referenced by the netif driver due to deferred transmission, however the callers
are modifying state even when this gives up.

It seems cleaner to have the callers guard this case and avoid modifying their
state.

tcp_rexmit_rto() might better avoid re-transmission of any segments if any of
the unacked segments are deferred, to avoid loading the link further if it is
struggling to flush its buffered writes. Link level queues can be limited on
some devices and need spares for link management.
2017-08-08 22:20:02 +02:00
goldsimon
991f751305 Even more pbuf_header -> pbuf_add/remove_header replacements (also in strings) 2017-08-08 20:51:57 +02:00
goldsimon
07434aa73a More pbuf_header -> pbuf_add/remove_header replacements 2017-08-08 20:40:26 +02:00
goldsimon
6d28e9de79 Some cleanups after applying David Girault's altcp patches 2017-08-08 12:59:49 +02:00
David Girault
ee89d906ec altcp_tcp: some fixes
- expose `altcp_tcp_setup()` so we can wrap altcp over existing tcp pcb.
- avoid calling tcp_close() with NULL pcb.
- free altcp_pcb struct when error callback called.

According to `mqtt_tcp_err_cb()` in src/apps/mqtt/mqtt.c, altcp socket should
work the same way than raw tcp socket. So freeing altcp_pcb ensure this.
2017-08-08 12:59:46 +02:00
David Girault
9d120c59ea altcp: fix altcp_free
call dealloc function in altcp_free() so it can be propagate it to inner_conn.
2017-08-08 12:59:45 +02:00
Dirk Ziegelmeier
60dd518887 Implement task #14594: Improve consistency of ip route API parameters
reverse parameters of ip4_route_src to be consistent with other ip*_route* functions
This commit will break applications using this function!
2017-08-08 12:41:19 +02:00
goldsimon
ae7c76c773 Rework pbuf_add_header_impl to only modify the pbuf after all checks passed 2017-08-08 12:19:06 +02:00
Dirk Ziegelmeier
6209c8d347 Fix bug #51686: pbuf_remove_header: silence unused variable warning
but in another way than the provided patch
2017-08-08 12:13:45 +02:00
Dirk Ziegelmeier
e65a388c1f ip4.c does not need to #include prot/dhcp.h any more 2017-08-08 11:49:00 +02:00
Dirk Ziegelmeier
1c91118f4a Add DHCP ports to iana.h 2017-08-08 11:46:15 +02:00
Dirk Ziegelmeier
5193844ac4 iana.h: Prefix #defines with LWIP_ 2017-08-08 11:21:11 +02:00
Dirk Ziegelmeier
79a08c9fee tcp.c: Remove side-effects from boolean expressions 2017-08-08 11:05:23 +02:00
Dirk Ziegelmeier
629ec98dd8 Work on task #14587: Create common header for IANA assigned numbers
Create include/lwip/prot/iana.h
Move DHCP and ARP #define in there
2017-08-07 21:06:19 +02:00
goldsimon
4fb7fab850 Fix docs on dhcp_option_trailer() 2017-08-07 08:08:24 +02:00
Our Air Quality
ff588fc771 dhcp: quieten a compile unused variable warning 2017-08-06 21:21:10 +02:00
goldsimon
a1c7924cb6 task #14597: cleanup pbuf_header usages (use pbuf_add_header/pbuf_remove_header instead) 2017-08-04 22:38:11 +02:00
goldsimon
a681f6b04f Fix using LWIP_HOOK_DHCP_PARSE_OPTION after recent dhcp changes 2017-08-04 21:53:24 +02:00
goldsimon
cd80e38db8 Clean up DHCP a bit: no need keep msg_out and msg_in as members in struct dhcp
They are used in a call stack only (p_out and options_out_len as well)
2017-08-04 21:26:29 +02:00
goldsimon
65ac160e99 Wconversion-related cleanup: split pbuf_header(s16_t) into pbuf_add_header(size_t) and pbuf_remove_header(size_t)
The new functions both take size_t as increment/decrement argument instead of s16_t (which needed to be range-checked before conversion everywhere) - in most places, the direction (increment or decrement) is known anyway, so no need to encode it in a sign bit
2017-08-04 13:16:18 +02:00
Joel Cunningham
6fa5d02435 tcp: remove extra seg == NULL checks
In tcp_output() there were a number of blocks of code performing
duplicate checks of 'if (seg == NULL)'.  This combines them together
to reduce duplicate checks

TCP_OUTPUT_DEBUG and TCP_CWND_DEBUG also don't need to be guarded
by #if/#endif since the LWIP_DEBUGF infrastructure already compiles them
out when LWIP_DEBUG is not defined
2017-08-03 10:37:16 -05:00
goldsimon
5ea7f507c3 Fixed bugs #51606 and #51535: IPv4 reassembly could be finished although there are holes 2017-08-02 21:11:53 +02:00
Axel Lin
2781d7abd7 ip6_reass: Move update ip6_frag.drop stats to nullreturn
The ip6_frag.drop counter is updated before all the code paths calling
goto nullreturn, so let's move updating ip6_frag.drop stats to nullreturn.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-08-01 20:48:08 +02:00
goldsimon
a81b19aa62 Fixed bug #51623: DHCP request XID should probably be regenerated for INIT-REBOOT 2017-07-31 20:20:31 +02:00
Joel Cunningham
2b2ea50cb1 ip4: fix swapped src/dst params with ip4_route_src
This fixes a couple of occurrences where the src and dst parameters to
ip4_route_src() were swapped. This was most likely due to confusion between
ip_route(src, dst) and ip4_route_src(dst, src)

This was found in a system where LWIP_IPV4_SRC_ROUTING is 0

The UDP case was an application socket bound to INADDR_ANY with
IP_MULTICAST_IF set. Transmits would result in calling ip4_route(dst) where
dst was pcb->local_addr (which was INADDR_ANY) instead of pcb->mcast_ip4.
This resulted in a routing failure

The ICMP issue was found through code analysis only
2017-07-31 08:57:11 -05:00
Dirk Ziegelmeier
006bb84368 Fix bug #50883: struct eth_addr alignment does not fit with ETHADDR16_COPY
... by simply removing ETHADDR16_COPY since noone advocated to keep it
2017-07-30 17:48:16 +02:00
goldsimon
500598658d ip4_reass: fixed bug #51596 (Insufficient overlap check) 2017-07-28 10:11:45 +02:00
goldsimon
3dedfa3d1f ip4_reass: fixed bug #51597 (Last fragment is assumed to have arrived even if it was discarded) 2017-07-28 09:46:56 +02:00
goldsimon
f1072fee8a ip4_reass: fixed bug #51595 (ip_reass_pbufcount may be updated incorectly) 2017-07-28 09:41:00 +02:00
Our Air Quality
ff03ae6f55 dhcp: restart dhcp after releasing.
There were uses of dhcp_release() followed immediately by dhcp_discover() but
dhcp_release() now stops dhcp so discovery would fail, so call dhcp_start()
after release which restarts discovery.

Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-07-28 07:57:50 +02:00
Axel Lin
925f3944d3 init: Correct minimal MEMP_NUM_SYS_TIMEOUT setting check
According to commit 1f780e86d5 ("PPP timeouts required depend on the number of allowed PPP sessions"):
Per PPP needs 6 timeouts (AUTH + PAP|CHAP|EAP + LCP + IPCP + IP6CP + PPPoE).

So update the minimal MEMP_NUM_SYS_TIMEOUT setting check accordingly.
Since we have LWIP_NUM_SYS_TIMEOUT_INTERNAL so just switch to use it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-27 20:51:11 +02:00
goldsimon
a2e4dd2de7 Minor whitespace cleanups 2017-07-25 21:48:17 +02:00
Matthias Hofmann
9b06d71aeb Fix using DHCP IP configuration after lease time is expired.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-25 21:46:57 +02:00
goldsimon
9b5d8f14a9 tcp_getoptbyte() -> tcp_get_next_optbyte() (to make it clearer that this function modifies something - not only a getter) 2017-07-25 21:38:06 +02:00
Pascal Quantin
2e78b6dcae Fixed bug #51528 (Bug when parsing WND_SCALE option)
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-24 21:38:47 +02:00
goldsimon
26771d0800 Add @todo: scope ip6addr? 2017-07-18 19:17:17 +02:00
Our Air Quality
5eff45cac0 Correct a few uses of sizeof(ip6_addr_t) to sizeof(ip6_addr_p_t)
The ip6_addr_t structure may have an addition slot so is not necessarily
the size of an ipv6 address, so some uses of sizeof(ip6_addr_t) were not
correct.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-18 19:17:17 +02:00
Joel Cunningham
7b13fae833 docs: update references to global igmp_group_list
This updates documentation to refer to netif specific igmp group list rather
than the old global igmp_group_list
2017-07-17 14:25:14 -05:00
Dirk Ziegelmeier
328134fdba Fix two -Wconversion warnings 2017-07-15 10:25:45 +02:00
Dirk Ziegelmeier
aa317dcb18 Fix dhcp documentation 2017-07-12 11:09:36 +02:00
Dirk Ziegelmeier
d021972785 Fix "no previous prototype" warning when TCP_QUEUE_OOSEQ is disabled 2017-07-11 09:59:11 +02:00
Dirk Ziegelmeier
449eb64fcb Fix my last commit - break is missing 2017-07-10 09:52:48 +02:00
Dirk Ziegelmeier
57b1471254 Avoid return in case statement, makes function control flow equal to other case statement paths 2017-07-10 09:40:21 +02:00
Dirk Ziegelmeier
9130d37df7 Add "fall through" statement to Axel's patch 2017-07-10 09:37:59 +02:00
Axel Lin
6f28a874b8 pbuf: Simplify pbuf_alloc a bit
No need to have additional if statement for PBUF_REF/PBUF_ROM.
It can be merged to the existing swtich(type) cases.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-07-10 09:37:07 +02:00
goldsimon
f3c860958f -Wconversion (still far from finished) and other minor compilation fixes... 2017-07-06 22:47:11 +02:00
goldsimon
b8ecfe640c work on -Wconversion... 2017-07-06 12:38:50 +02:00
goldsimon
694fc7e472 work on -Wconversion... 2017-07-06 11:22:38 +02:00
goldsimon
9d61e36466 work on -Wconversion, fixed some const bug in ip4 2017-07-06 09:01:03 +02:00
goldsimon
44f7a3cb0d work on -Wconversion... 2017-07-05 22:31:58 +02:00
goldsimon
c5607d3889 Fix compiling ASSERT (broken some commits ago) 2017-07-05 12:22:02 +02:00
goldsimon
ba6b504cc0 work on -Wconversion... 2017-07-05 12:20:26 +02:00
goldsimon
9a40597ced work on -Wconversion... 2017-07-04 21:31:30 +02:00
goldsimon
debf34ff9c work on -Wconversion... 2017-07-04 21:26:30 +02:00
goldsimon
2b2fa0ed71 Ensure SACKs are deleted when pbuf_free_ooseq() frees ooseq pbufs (because of memory shortage) 2017-07-04 20:10:23 +02:00
goldsimon
0b91888eb1 remove invalid TODO comment 2017-07-04 20:09:41 +02:00
goldsimon
1a1c360f1d Fixed LWIP_TCP_SACK_VALID and its usage 2017-07-03 21:41:34 +02:00
goldsimon
6796bcf7ad Cleaned up a bit after merging SACK_OUT support (mostly coding style) 2017-07-03 21:20:56 +02:00
Jakub Schmidtke
b1a3c37c3c Partial SACK (RFC 2018) support
Adds partial support for selective acknowledgements (RFC 2018).
This change makes lwIP negotiate SACK support, and include SACK
data in outgoing empty ACK packets. It does not include it
in outgoing packets with data payload.
It also does not add support for handling incoming SACKs.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-03 20:17:30 +02:00
goldsimon
d262132b92 work on -Wconversion... 2017-07-03 20:15:02 +02:00
Dirk Ziegelmeier
94beb4eddf Make inet_chksum.c compile with -Wconversion 2017-06-30 22:17:32 +02:00
goldsimon
41177cfd1c work on -Wconversion... 2017-06-30 22:10:16 +02:00
goldsimon
c636072362 pbuf.c: work on -Wconversion... 2017-06-29 22:49:39 +02:00
goldsimon
5bddbdd914 tcp_output: faster return when nothing is to send (pcb->unsent == NULL) 2017-06-29 08:47:26 +02:00
goldsimon
48e55b1e5d tcp_output: slightly move the jump target 'output_done': when nothing is to send, pcb->unsent cannot be NULL; add a 2017-06-29 08:43:59 +02:00
goldsimon
092c6c1f07 DNS_MAX_SOURCE_PORTS is PP-checked to be <= 255... 2017-06-26 08:48:17 +02:00
goldsimon
5efe26ebd3 Fix the fix for LWIP_LOOPBACK_MAX_PBUFS :-) 2017-06-26 08:21:53 +02:00
goldsimon
5b15234833 work on -Wconversion... 2017-06-25 23:01:57 +02:00
goldsimon
197166d906 LWIP_LOOPBACK_MAX_PBUFS: fix compilation or memory leak for LWIP_LOOPBACK_MAX_PBUFS > 255 2017-06-25 20:31:09 +02:00
goldsimon
af0f4d4020 Start making the source compile correctly with gcc -Wconversion enabled 2017-06-23 21:15:36 +02:00
Dirk Ziegelmeier
d02a73c285 Replace usages of tcpip_callback_with_block(foo, bar, 0) with tcpip_try_callback() 2017-06-22 08:14:02 +02:00
goldsimon
c094fcc086 Try to make gcc work without -Wno-address 2017-06-21 16:07:36 +02:00
goldsimon
79d69ce526 Slightly optimize pbuf_alloc: encode 'header offset' in 'enum pbuf_layer' instead of switch/case (which was duplicated in pbuf_alloc and pbuf_alloced_custom) 2017-06-21 13:37:05 +02:00
goldsimon
11da4ef024 Use ip_addr_debug_print_val instead of ip_addr_debug_print where applicable 2017-06-21 13:26:55 +02:00
Axel Lin
aa98747d6f timeouts: Trivial comment fix for cyclic_timer
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-21 13:11:48 +02:00
goldsimon
f13b1340f2 Refine comment changed by last commit 2017-06-20 20:53:39 +02:00
Jakub Schmidtke
112e370457 Sending TCP timestamp option in SYN packets
TCP timestamps were only sent if the remote side
requested it first. This enables the use of timestamps
for outgoing connections as well.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-20 20:51:50 +02:00
Our Air Quality
6e62b6090b Silence some unsed variable warnings. 2017-06-19 14:09:07 +02:00
Axel Lin
02aaf12f48 stats: Use proper format modifier in stats_display_mem/stats_display_sys
Use proper format modifier and remove unnecessary cast.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-06-19 14:07:31 +02:00
Dirk Ziegelmeier
c923d00340 Fix bug #51238: LWIP_ARRAYSIZE() can't be used on lwip_cyclic_timers
Add const int variable containing number of array elements
2017-06-14 23:07:55 +02:00
goldsimon
67d1970059 pbuf_alloced_custom(): less code duplication, please :-) 2017-06-14 21:39:53 +02:00
Dirk Ziegelmeier
d5cdb91611 Fix compile of Axel Lin's patch 2017-06-14 12:30:55 +02:00
Axel Lin
6b4cc984ad pbuf: Allow pass flags to pbuf_init_alloced_pbuf()
Then we can reuse pbuf_init_alloced_pbuf() in pbuf_alloced_custom().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-06-14 12:28:29 +02:00
goldsimon
7b45f3fa3f Fix sys_timeouts_init() for LWIP_TCP==0 (see patch #9375) 2017-06-13 22:04:57 +02:00
Axel Lin
e1ce5dc491 mem: Move LWIP_DEBUGF out of critical section in mem_malloc
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-06-13 22:02:17 +02:00
Joel Cunningham
3eaf976152 tcp: fix cwnd rollover introduced by ABC
Changes for TCP Appropriate Byte Counting introduce a potential cwnd
rollover by not taking into account integer promotion on tcpwnd_size_t
during inequality comparisions

This fixes the issue by introducing a macro TCP_WND_INC which detects
the rollover correctly and now holds the tcpwnd_size_t at the maximum
value rather than not incrementing the window.  This provides a slight
performance improvement by allowing full use of the tcpwnd_size_t number
space for the congestion window
2017-06-01 12:34:57 -05:00
David Girault
dc2bdc2a21 memp: allow initialization of pool memory if not in standard section 2017-05-31 19:11:33 +02:00
Axel Lin
3aca7885a7 pbuf: Init pbuf if_idx to NETIF_NO_INDEX in pbuf_alloced_custom
Otherwise the p->pbuf.if_idx is uninitialized.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-05-31 19:10:00 +02:00
goldsimon
ba1cf2fa44 memp malloc: move LWIP_DEBUGF out of critical section (bug #51142) 2017-05-30 11:39:42 +02:00
Tim Cussins
84502e5ae0 etharp.c: Ensure etharp_query() allocates adequate pbuf if copying/consolidating.
etharp_query() queues packets, instead of sending, if a relevant arp-request is
pending.

Code walks the packet (a pbuf chain) to determine whether any pbufs are marked
'volatile': If so, we cannot simply enqueue the packet, and instead allocate a
new pbuf from RAM, copying the original packet, and enqueueing this new pbuf.

The bug here is that the allocation refers to the tot_len field of a temp pbuf*,
'p', instead of the head, 'q'.

In the case where the first pbuf of the chain is non-volatile but the second pbuf
*is* volatile, then we'll request an allocation that uses the tot_len field of
the second pbuf. If the first pbuf is non-zero length, the allocated pbuf (chain)
will be too small to allow the copy.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-05-29 21:48:51 +02:00
Our Air Quality
fb9fabb87c Initialize the tcp listen pcb netif_idx to NETIF_NO_INDEX.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-05-29 21:48:51 +02:00
Axel Lin
cbbfb1356c pbuf: Make pbuf_init_alloced_pbuf take pbuf_type instead of u8_t for type parameter
All callers pass pbuf_type to pbuf_init_alloced_pbuf(), so make it take
pbuf_type instead of u8_t.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-05-24 12:19:32 +02:00
goldsimon
356da76cc8 Work on bug #3031/task #7896: change pbuf->type/enum pbuf_type to be more generic (see UPGRADING) 2017-05-22 22:30:55 +02:00
goldsimon
5c65402fd6 minor: whitespace change only to make the next diff smaller :-) 2017-05-22 22:30:19 +02:00
goldsimon
20fd844935 fixed typo in docs 2017-05-11 21:26:34 +02:00
Joel Cunningham
c03fef9a3c bug #50837: add zero-window probe timeout
This commit adds a timeout to the zero-window probing (persist timer)
mechanism. LwIP has not historically had a timeout for the persist
timer, leading to unbounded blocking if connection drops during the
zero-window condition

This commit also adds two units test, one to check the RTO timeout
and a second to check the zero-window probe timeout
2017-05-09 09:01:03 -05:00
Dirk Ziegelmeier
a942582b4b Minor #ifdef cleanup in netif.c 2017-05-05 11:11:19 +02:00
Axel Lin
89d825f603 netif: Fix IPv6-only build
Fix below build error if LWIP_IPV4 == 0.
cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -I../../../../mbedtls/include -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1 -c ../../../../lwip/src/core/netif.c
../../../../lwip/src/core/netif.c: In function ‘netif_add’:
../../../../lwip/src/core/netif.c:284:7: error: ‘ipaddr’ undeclared (first use in this function)
   if (ipaddr == NULL) {
       ^~~~~~
../../../../lwip/src/core/netif.c:284:7: note: each undeclared identifier is reported only once for each function it appears in
../../../../lwip/src/core/netif.c:285:14: error: implicit declaration of function ‘ip_2_ip4’ [-Werror=implicit-function-declaration]
     ipaddr = ip_2_ip4(IP4_ADDR_ANY);
              ^~~~~~~~
../../../../lwip/src/core/netif.c:285:5: error: nested extern declaration of ‘ip_2_ip4’ [-Werror=nested-externs]
     ipaddr = ip_2_ip4(IP4_ADDR_ANY);
     ^~~~~~
../../../../lwip/src/core/netif.c:285:23: error: ‘IP4_ADDR_ANY’ undeclared (first use in this function)
     ipaddr = ip_2_ip4(IP4_ADDR_ANY);
                       ^~~~~~~~~~~~
../../../../lwip/src/core/netif.c:287:7: error: ‘netmask’ undeclared (first use in this function)
   if (netmask == NULL) {
       ^~~~~~~
../../../../lwip/src/core/netif.c:290:7: error: ‘gw’ undeclared (first use in this function)
   if (gw == NULL) {
       ^~
cc1: all warnings being treated as errors
../../Common.allports.mk:94: recipe for target 'netif.o' failed
make: *** [netif.o] Error 1

Fixes: 5967380c20 ("netif_add: avoid passing NULL pointers to subsequent functions")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-05 10:39:15 +02:00
Dirk Ziegelmeier
5967380c20 netif_add: avoid passing NULL pointers to subsequent functions (reported by Axel Lin) 2017-05-05 09:07:40 +02:00
Axel Lin
9bbb741247 tcp: Remove unreachable code in tcp_close_shutdown_fin
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-05 08:58:09 +02:00
goldsimon
72a8db7867 tcp_fasttmr: adapt comment (to delayed FIN implementation) 2017-05-03 21:42:59 +02:00
goldsimon
eff97c04ef backport of "unreachable code" warnings from STM (why don't people report such things?) 2017-05-03 20:30:38 +02:00
Dirk Ziegelmeier
6c236b047e ip_route() can be called with IP_ANY_TYPE in src parameter, so remove code associated to that 2017-05-03 16:42:30 +02:00
Joel Cunningham
ddf4e17411 tcp: indentation fix in tcp_receive()
TCP_OVERSIZE block was moved out from inside the while loop and thus
should be on column 7
2017-05-03 09:29:02 -05:00
goldsimon
4cf6f9ed51 tcp_free_acked_segments: fix debug printf parameter errors, fix unused parameters for !LWIP_DEBUG and/or LWIP_NOASSERT 2017-05-03 13:49:24 +02:00
goldsimon
778206798e task #14433: TCP: combine unsent/unacked queue loops in tcp_receive() 2017-05-03 12:32:01 +02:00
goldsimon
b9c47c5089 tcp_route: add comment, fixed whitespace 2017-05-03 09:56:08 +02:00
goldsimon
5c0aab7bd5 udp SO_REUSE_RXTOALL: don't copy IP header in duplicated pbuf 2017-05-03 09:54:46 +02:00
Dirk Ziegelmeier
2b9a132772 Fix compile in tcp_route when IPv4 only is used and source-based routing is disabled 2017-05-03 09:09:37 +02:00
Dirk Ziegelmeier
d32492e953 Make patch 4 of David's Minix3 patches superfluous: Use PBUF_POOL to duplicate incoming packets in UDP
... which would have been the correct way to do it anyway :-)
http://git.minix3.org/index.cgi?p=minix.git;a=blob;f=minix/lib/liblwip/patches/0004-MINIX-3-only-avoid-large-contiguous-allocations.patch;h=f23143c7e8d372b3b35b599a97975d79924f73c1;hb=HEAD
2017-05-03 09:02:56 +02:00
goldsimon
7defe372b9 fixed compiling pbuf.c with LWIP_TCP==0 2017-05-03 09:02:06 +02:00
Dirk Ziegelmeier
676dd74140 Minor cleanup and documentation updates 2017-05-03 08:51:00 +02:00
Dirk Ziegelmeier
e835707814 Cleanup and simplify tcp_connect() code 2017-05-03 08:46:06 +02:00
Dirk Ziegelmeier
5800cf51be Work on task #14494: Implement SO_BINDTODEVICE
TCP needs additional netif handling
2017-05-03 08:00:06 +02:00
Axel Lin
c144e5b1ec pbuf_coalesce: Replace pbuf_alloc+pbuf_copy with pbuf_clone
Avoid duplicate the same implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-05-02 20:36:00 +02:00
Axel Lin
bc0fafdeca udp: Fix compiling for IPv6-only build
Fix below build error when LWIP_IPV6 && !LWIP_IPV4:
cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -I../../../../mbedtls/include -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1 -c ../../../../lwip/src/core/udp.c
../../../../lwip/src/core/udp.c: In function ‘udp_input_local_match’:
../../../../lwip/src/core/udp.c:130:58: error: unused parameter ‘inp’ [-Werror=unused-parameter]
 udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast)
                                                          ^~~

Fixes: 13ffc86aef ("Start working task #14494: Implement SO_BINDTODEVICE")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-02 15:55:32 +02:00
Dirk Ziegelmeier
eab2ae5d78 Cleanup netif_name_to_index() implementation 2017-05-02 12:51:25 +02:00
goldsimon
0545eba002 Fixed copy&paste error found by travis-ci... 2017-05-02 10:42:59 +02:00
Dirk Ziegelmeier
13ffc86aef Start working task #14494: Implement SO_BINDTODEVICE
Implement binding TCP, UDP and RAW PCBs to a netif
2017-05-02 09:39:48 +02:00
Dirk Ziegelmeier
20fed63297 Add custom pbuf usage example to pbuf_alloced_custom() docs 2017-04-28 13:19:32 +02:00
Dirk Ziegelmeier
1aa24ee21b Add new DHCP hooks to DHCP docs 2017-04-27 12:42:14 +02:00
Dirk Ziegelmeier
a09a8e4a06 Some documentation updates and fixes
Dedicated Zero-copy RX page
Fix doxygen warnings
2017-04-27 12:41:08 +02:00
goldsimon
6aac9377ee Clean up LWIP_NETIF_HWADDRHINT a bit: create a struct holding the hint(s) and pass a pointer to that struct around. That way we are free to add more hints if required (e.g. see task #11620) 2017-04-27 12:39:54 +02:00
Axel Lin
4c9b316e6b pbuf: Fix allocate zero length pbuf
Current code fails to allocate zero length pbuf (e.g. for PBUF_RAW PBUF_POOL),
fix it.

Fixes: eb269e61b5 ("First step to clean up pbuf implementation: add pbuf_alloc_reference() to allocate pbufs referencing external payload; move member initialization to common function; simplify PBUF_POOL chain allocator")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-04-26 20:15:22 +02:00
goldsimon
eb269e61b5 First step to clean up pbuf implementation: add pbuf_alloc_reference() to allocate pbufs referencing external payload; move member initialization to common function; simplify PBUF_POOL chain allocator 2017-04-25 23:04:12 +02:00
goldsimon
e57552d401 pbuf_alloc_copy -> pbuf_clone 2017-04-25 22:02:07 +02:00
goldsimon
2fef874494 task #14270: DHCP should support user-defined additional options: added two hooks for adding and parsing user defined DHCP options 2017-04-25 20:18:59 +02:00
Axel Lin
471daba011 tcp_out: Fix LWIP_NETIF_TX_SINGLE_PBUF guard for not executing phase 2
This fixes build error if LWIP_NETIF_TX_SINGLE_PBUF==1.

Fixes: dd811bca06 ("Fix bug #50694 (TX exist more pbufs after enable LWIP_NETIF_TX_SINGLE_PBUF) by not executing phase 2 for LWIP_NETIF_TX_SINGLE_PBUF==1")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-04-25 20:17:47 +02:00
goldsimon
ca961b9bc2 minor whitespace cleanups only 2017-04-25 12:07:28 +02:00
goldsimon
d02bc6481f Fixed bug #50816 (netif_add() prototype depends on configuration) by adding a new function netif_add_noaddrthat doesn't change 2017-04-25 12:05:05 +02:00
goldsimon
135d506065 minor whitespace fixes only 2017-04-25 12:03:52 +02:00