Joel Cunningham
d850efdd08
IPv6 sockaddr clean ups
...
This commit address two issues with sockaddr struct implementations for
IPv6:
1) struct sockaddr_in6 should have 32-bit unsigned field sin6_scope_id
as specified in Section 3.4 of RFC 3493 (Basic Socket Interface
Extensions for IPv6)
2) struct sockaddr is not extended in IPv6 to contain space for
struct sockaddr_in6. Applications should be using struct
sockaddr_storage when needing generic storage. This removes the
extra bytes added when LWIP_IPV6 is defined
2015-08-19 10:15:47 +02:00
goldsimon
a6bd0944db
LWIP_NETCONN_SEM_PER_THREAD: ensure sys_sem_valid() is only called for non-NULL pointers (not all ports might check this)
2015-08-19 09:57:59 +02:00
goldsimon
7df2dd67bd
another fix for LWIP_MULTICAST_TX_OPTIONS: without LWIP_IGMP, udp_pcb->mcast_ttl was not initialized
2015-08-19 09:19:08 +02:00
goldsimon
5be95aa377
accidentally committed debug comment //
2015-08-19 08:36:54 +02:00
sg
c2f978bd1e
patch by Chrysn: patch #8704 fix sys_timeouts_sleeptime function
2015-08-18 21:38:08 +02:00
sg
21815a1427
dns: fixed assertion when dns server address is set to ANY (patch #8692 )
2015-08-18 21:30:46 +02:00
chrysn
877fcb35f4
fix return type of netif_add_ip6_address mismatch
...
the netif_add_ip6_address function was declared err_t in
src/include/lwip/netif.h, but defined as s8_t (the default value of
err_t) in its implementation in src/core/netif.c.
this causes "conflicting types for 'netif_add_ip6_address'" errors if
err_t is defined differently in cc.h (as for example recommended in
[1]).
as it only returns error constants, it is changed to use err_t
throughout.
[1] http://lwip.wikia.com/wiki/Porting_For_Bare_Metal
2015-08-18 20:55:30 +02:00
sg
c2f7e166a0
fixed bug #45723 netconn_delete unconditionally uses macro TCP_SLOW_INTERVAL
2015-08-18 20:32:09 +02:00
sg
e171b4e3f0
Fixed usages of SYS_SEM_NULL after using pointers everywhere
2015-08-18 20:29:16 +02:00
goldsimon
2a6f31a84e
fix that LWIP_MULTICAST_TX_OPTIONS must be used in ip4_route instead of LWIP_IGMP
2015-08-18 16:35:06 +02:00
goldsimon
bc4473b275
Fixed that netconn_thread_cleanup() did not call LWIP_NETCONN_THREAD_SEM_FREE() (!= vs ==)
2015-08-18 11:13:38 +02:00
Sylvain Rochet
43c38a5aeb
PPP, Documentation, add that we support MPPE
2015-08-07 16:53:27 +02:00
sg
6e5ff1dbe8
Enable LWIP_HAVE_LOOPIF by default when LWIP_NETIF_LOOPBACK==1 to not make loopback traffic depend on the only netif's link state
2015-08-05 22:56:10 +02:00
sg
4edade8079
allow multicast socket options IP_MULTICAST_TTL, IP_MULTICAST_IF and IP_MULTICAST_LOOP to be used without IGMP
2015-08-05 22:52:23 +02:00
sg
9352988c44
Tried to improve pbuf_type, LWIP_SUPPORT_CUSTOM_PBUF and PBUF_FLAG_IS_CUSTOM documentation
2015-08-05 22:26:57 +02:00
sg
e5e0a21fc6
LWIP_COMPAT_SOCKETS==2: special setting to help code parsers/code completion to show argument names/types for posix socket functions
2015-08-05 21:41:50 +02:00
Edgar Bonet
fb456e00ac
Fix documentation of TCP_WRITE_FLAG_MORE.
...
The description of the flag was erroneous in src/core/tcp_out.c, and
self-contradictory in doc/rawapi.txt.
2015-08-05 21:20:34 +02:00
sg
851e03966d
Fixed more compiler warnings for unit tests
2015-08-05 21:15:41 +02:00
Erik Ekman
38e3299675
test_etharp: Fix warning about braces
...
../../lwip-trunk/test/unit/etharp/test_etharp.c:16:8: warning: missing
braces around initializer [-Wmissing-braces]
struct eth_addr test_ethaddr = {1,1,1,1,1,1};
^
2015-08-05 21:04:33 +02:00
Erik Ekman
dbdeca3032
test_tcp_oos: Remove last_dropped variable, never read
2015-08-05 21:01:17 +02:00
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