Commit Graph

3393 Commits

Author SHA1 Message Date
sg
a78e4c6cf3 track bugfixed in CHANGELOG 2015-08-05 20:57:54 +02:00
sg
76e785dd5e Fix that pbuf_realloc() called mem_trim() for "custom" PBUF_RAM 2015-08-05 20:40:35 +02:00
sg
767d0d9046 Fixed unit tests (compiler errors/warnings, coding style) 2015-08-03 20:41:49 +02:00
Erik Ekman
145efb1a33 Fix edge case in pbuf_take_at()
Writes to offsets pointing to the start of a pbuf in the chain
did nothing and just returned ERR_OK.

Added unit tests to verify the fix, and also
that pbuf_get_at()/pbuf_put_at() handles this case.
2015-08-03 20:34:08 +02:00
goldsimon
22d2af2a29 we are moving towards 1.5.0 -> set LWIP_VERSION accordingly 2015-08-03 13:58:48 +02:00
goldsimon
13801ebd74 netif_find(): name parameter can be const 2015-08-03 13:47:25 +02:00
goldsimon
614fa7b853 ... and one more change to those nasty ~ operator warnings :-( 2015-08-03 11:12:53 +02:00
goldsimon
4b815eece9 added lwip_socket_thread_init/cleanup to use LWIP_NETCONN_SEM_PER_THREAD/LWIP_NETCONN_FULLDUPLEX without including anything but sockets.h 2015-08-03 10:15:29 +02:00
goldsimon
11f350e63f Fixed ~ warnings in a different way 2015-08-03 09:10:49 +02:00
goldsimon
4dc3c7a6a0 Fixed warnings about NULL check not required (ip_addr_isany) and implicit conversion (~) 2015-08-03 08:35:01 +02:00
goldsimon
d106053e4c Removed accidentally committed // comment 2015-08-03 08:27:33 +02:00
goldsimon
5315751dc9 init.c: fixed window scaling range check 2015-08-03 08:24:36 +02:00
Erik Ekman
e448a9a4a9 err, debug: add missing ERR_ALREADY to lwip_strerr()
When ERR_ALREADY was added other error codes were renumbered.
The strerr function was not updated so it returned incorrect data
for ERR_CONN - ERR_IF.
2015-07-27 00:49:18 +02:00
Joel Cunningham
5b0d9338fd netif, loopif: set link up on loopback interface
When LWIP_HAVE_LOOPIF is enabled, a separate loopback interface is added
as a netif. A netif need to have its link state set to up to be able to be
selected as a route in ip4_route or ip6_route.

The regression appears to be when bug #43904 (ip_route() and ip6_route()
must detect linkup status) was fixed.

Furthermore, there is no point of having the loopif down by default.
2015-07-27 00:22:30 +02:00
sg
409d7a99f9 Minor coding style fix 2015-07-14 22:17:49 +02:00
Joel Cunningham
f77e581468 Fix netbuf_destport() when LWIP_CHECKSUM_ON_COPY is not enabled
This commit fixes a bug in netbuf_destport() where LWIP_NETBUF_RECVINFO is
enabled, but not LWIP_CHECKSUM_ON_COPY is enabled

The flags field is only available when LWIP_CHECKSUM_ON_COPY is enabled. In
this mode, the toport_chksum is dual functioning as storage for port and
checksum
2015-07-14 22:17:06 +02:00
goldsimon
d3217718a9 Reverted fix for bug #38203 since it might be wrong 2015-06-23 09:20:06 +02:00
Stian Skjelstad
7e76480db4 udp: multicast, fix udp_set_multicast_ttl() parameter and structure member conflict
Macro-parameter name can not be the same as the structure member to
dereference.
2015-06-16 12:00:00 +02:00
tabascoeye
7856141fc4 icmp: fix checksum on replies of echo request with ID 0, sequence 0 and either no data or any amount of 0x00 Bytes as data (closes: #45322)
When a client sends an ICMP echo request with ID 0, sequence 0 and
either no data or any amount of 0x00 bytes as data, the checksum in the
reply is wrong (off-by-one).

Expected checksum is 0xffff in that case, observed is 0x0000.
2015-06-15 15:53:14 +02:00
goldsimon
232cf8c28b Fixed bug #45098 ip_addr_t type field not populated for socket address copies (patch by James Smith) 2015-05-21 15:51:47 +02:00
goldsimon
b51805b87e fixed bug #45135 getsockopt SO_SNDTIMEO, SO_RCVTIMEO broken 2015-05-21 15:47:21 +02:00
goldsimon
392ef77bc5 Fixed bug #45161 tcp.c / tcp_abandon / pcb->local_port set to zero but needed later for tcp_rst (introduced some months ago when fixing bug #42299) 2015-05-21 15:45:09 +02:00
goldsimon
de83c3e9e0 fixed bugs #45140 and #45141 (dhcp was not stopped correctly after fixing bug #38204) 2015-05-19 10:56:08 +02:00
goldsimon
050d233e10 changed dhcp state name defines to include "STATE_" to prevent confusion with message types (e.g. INFORMING vs. INFORM) 2015-05-19 10:32:14 +02:00
Sylvain Rochet
8c1f834a4a fixed bug #39683 Assertion "seg->tcphdr not aligned" failed with MEM_ALIGNMENT 1 or 2
We used a static 4 instead of MEM_ALIGNMENT earlier, however it broke
things for MEM_ALIGNMENT 1 or 2, fixed using a LWIP_MIN(MEM_ALIGNMENT,
4) statement.
2015-05-11 11:21:08 +02:00
Ivan Delamer
cbeb5ab960 Remove 6LowPAN flag that will not be used. 2015-05-05 14:43:58 -06:00
Ivan Delamer
33a51a1bdc Improved IPv6 address formatting in ip6addr_ntoa_r(). 2015-05-05 14:01:38 -06:00
Ivan Delamer
73660f779b changes to ip6addr_aton() to avoid crash with some ill-formatted
strings.
2015-05-05 13:26:17 -06:00
Ivan Delamer
2c79332de7 Only send RS messages if we have a LL address in some state other than
invalid.
2015-05-05 13:05:41 -06:00
Ivan Delamer
2aec025e16 Bug fix: properly use unspecified source address for router solicitation
if needed.
2015-05-05 13:00:17 -06:00
Ivan Delamer
24f486261a Small bug fix in ipaddr_ntoa_r when IPv4 and IPv6 are enabled. 2015-05-05 11:57:23 -06:00
Edgar Bonet
f0c4944e2c sockets: do not assume defined(FD_SET) implies defined(FD_SET_VAL). 2015-05-05 14:08:42 +02:00
Edgar Bonet
cf15872b8d SNMP, Missing const qualifier on internet_nodes[] in mib2.c. 2015-05-05 13:02:30 +02:00
Sylvain Rochet
78e1b9b7c1 PPP, don't store the name by which the peer authenticated itself to us if multilink support is disabled
pcb->peer_authname is only used by multilink support (which we don't
support), don't store the useless peer authname.
2015-05-01 22:51:09 +02:00
Sylvain Rochet
967a8d0678 PPP, opt.h: fixed coding style 2015-05-01 01:01:42 +02:00
Sylvain Rochet
fa44cef27b PPP, L2TP, added configurable L2TP MRU using opt.h 2015-05-01 00:49:19 +02:00
Sylvain Rochet
29ba3df717 PPP, re-enabled MRU defines in opt.h 2015-05-01 00:08:34 +02:00
Sylvain Rochet
aacc222b7d PPP, display MTU set through netif_set_mtu() if debug is enabled 2015-04-30 23:41:47 +02:00
Sylvain Rochet
341f0bf9e3 PPP, assert if ppp_fatal() is called 2015-04-30 13:48:08 +02:00
Sylvain Rochet
091c6a3bda PPP, cleanup unused/redefined/useless limits in ppp_impl.h 2015-04-30 01:07:11 +02:00
Sylvain Rochet
fd53cad208 PPP, sifnpmode() is only useful if on demand is supported, build out if not
We don't support PPP on demand, don't build sifnpmode() which is only
useful for on demand if on demand is not supported.
2015-04-30 00:06:24 +02:00
Sylvain Rochet
1b6d6d0dc0 PPP, removed unnecessary memset()
Everything is cleared in ppp_clear(), we don't need to clear all
structures twice.
2015-04-29 23:55:23 +02:00
Sylvain Rochet
40c671b1a5 PPP, PPPoS, also clear last_xmit when resetting PPPoS control block 2015-04-29 23:41:23 +02:00
Sylvain Rochet
0a8b1c199d PPP, added missing cast on pbuf_header() 2015-04-26 23:42:18 +02:00
Sylvain Rochet
3a3c823ddb PPP, MPPE, try to use pbuf_header() in mppe_compress()
If there is enough space in front of the buffer, use it instead of
allocating a new pbuf.
2015-04-26 23:27:31 +02:00
Sylvain Rochet
900f3c9a09 PPP, MPPE, don't issue CCP reset request in stateless mode
This is useless, flushed bit is always true in stateless mode, we
don't need to issue a CCP reset request in this case.
2015-04-26 22:13:11 +02:00
Sylvain Rochet
8fe2f747f4 PPP, MPPE, issue CCP reset request if synchronization is lost
If MPPE synchronization is lost, it is advised to send a CCP reset
request in order to recover to a clean state.
2015-04-26 22:04:21 +02:00
Sylvain Rochet
adaeff5540 PPP, MPPE, discard late packet in stateless mode
When PPP is used over a link which does not guarantee packet ordering,
we might get late MPPE packets. This is a problem because MPPE must be
kept synchronized and the current implementation does not drop them and
rekey 4095 times instead of 0, which is wrong.

In order to prevent rekeying about a whole count space times (~ 4095
times), drop packets which are not within the forward 4096/2 window and
increase sanity error counter.
2015-04-26 20:59:09 +02:00
Sylvain Rochet
d0f91c00cb PPP, MPPE, sanity error path rework
We are going to need sanity error path a little further, rework to be
able to use the sanity error path anywhere in decompressor.
2015-04-26 20:57:01 +02:00
sg
e20a071977 added functions dhcp/autoip_supplied_address() to check for the source of address assignemnt (replacement for NETIF_FLAG_DHCP) 2015-04-24 21:23:15 +02:00