Commit Graph

1602 Commits

Author SHA1 Message Date
goldsimon
196120fabd worked on task #12243 (Add support for AAAA/IPv6 records to DNS) 2015-09-04 13:57:20 +02:00
goldsimon
dd3725a452 task #12243: DNS/IPv6: added support for AAAA records 2015-09-04 12:16:14 +02:00
goldsimon
c8cd67c989 fixed pointer type of value passed for snmpenableauthentraps (broken in 2010) 2015-09-03 14:02:30 +02:00
Stian Sebastian Skjelstad
aea87a9a2f Forget addresses set up by SLAAC when prefix expires. 2015-09-02 13:12:52 -06:00
sg
aa0e41c389 task #12178: hardware checksum capabilities can be configured per netif (use NETIF_SET_CHECKSUM_CTRL() in your netif's init function) 2015-09-01 22:04:15 +02:00
goldsimon
dd8feb49aa PBUF_REF with "custom" pbufs is now supported for RX pbufs (see pcapif in contrib for an example, LWIP_SUPPORT_CUSTOM_PBUF is required) 2015-08-31 08:29:23 +02:00
sg
a01a1b4556 support IPv4 source based routing: define LWIP_HOOK_IP4_ROUTE_SRC to point to a routing function 2015-08-30 21:54:39 +02:00
sg
b9a8310f4b fixed bug #44023: TCP ssthresh value is unclear: ssthresh is set to the full send window for active open, too, and is updated once after SYN to ensure the correct send window is used 2015-08-30 20:47:17 +02:00
Sylvain Rochet
ddba4b90c3 fixed typo: IP6_FRAG_COPYHEADER -> IPV6_FRAG_COPYHEADER 2015-08-28 14:28:04 +02:00
goldsimon
98f98048bc TCP window scaling: don't parse window scaling option on retransmission 2015-08-28 11:23:24 +02:00
goldsimon
367ac04ed8 Fixed UDP multicast receive filtering (multicast should only be received when bound to ANY or the destination multicast address) 2015-08-28 10:24:02 +02:00
goldsimon
43b18b20cc fixed bug #45818: API functions should check if type of ip_addr_t parameter matches the pcb type 2015-08-28 10:15:57 +02:00
goldsimon
06d8dba4a0 fixed bug #45559: Window scaling casts u32_t to u16_t without checks 2015-08-28 09:23:10 +02:00
sg
bc8120c864 Add another sanity check for bug #41009 2015-08-27 21:43:42 +02:00
sg
413bf85dde Remove empty init functions where not required for backwards compatibility 2015-08-27 21:35:18 +02:00
sg
f649172580 fixed bug bug #41009: IPv6 reassembly broken on 64-bit platforms: define IPV6_FRAG_COPYHEADER==1 on these platforms to copy the IPv6 header instead of referencing it, which gives more room for struct ip6_reass_helper 2015-08-26 22:16:23 +02:00
sg
aad76acb68 IPV6_REASS: fix ip6_reass_remove_oldest_datagram() when the first fragment to enqueue has more pbufs than IP_REASS_MAX_PBUFS 2015-08-26 21:20:13 +02:00
sg
5eb1c411a5 LWIP_LOOPIF_MCAST -> LWIP_LOOPIF_MULTICAST 2015-08-26 20:55:51 +02:00
Joel Cunningham
0ab21da820 Add multicast support to loopif
This commit adds support to send and receive multicast on the loopback
netif by enabling IGMP via NETIF_FLAG_IGMP

This commit also introduces an LwIP configuration option,
LWIP_LOOPIF_MCAST, to control the behavior and it defaults to off
2015-08-26 20:28:03 +02:00
sg
94550682d7 more cleanup prework to fix bug #45029 2015-08-24 22:46:34 +02:00
goldsimon
ee2d01ed88 fix compiler warnings when passing u16_t to pbuf_header() 2015-08-24 08:49:51 +02:00
sg
177c06b1f1 - prework for fixing bug #45029: access IPv4 configuration of struct netif via new API (netif_ip4_addr()/netif_ip4_netmask()/netif_ip4_gw()) instead of accessing the struct member directly. This way, we can change the struct member types from ip4_addr_t to ip_addr_t;
- fixed some bugs in calls to ip4_addr*() where the cast to u8_t* did not reveal the wrong address type
2015-08-20 22:39:48 +02:00
goldsimon
cc348dcca2 LWIP_IGMP and LWIP_MULTICAST_TX_OPTIONS need LWIP_IPV4 2015-08-20 16:36:54 +02:00
goldsimon
8622af77c1 nd6: adapt to constness of IP6_ADDR_ANY6 for IPv6-only configuration 2015-08-20 16:35:49 +02:00
goldsimon
3b21f469ca fix bug #45120 in a cleaner way 2015-08-20 13:05:59 +02:00
goldsimon
da5ccbf7d1 SNMP: tiny preparation for SNMP to support more versions than just v1: store request version in struct snmp_msg_pstat so that the response can be sent with the same version (v2c might already work but getbulk is missing) 2015-08-20 09:38:17 +02:00
goldsimon
5bd262f9e9 fixed passing u16_t 'snmp_varbind->value_len' to functions taking an u8_t only 2015-08-20 08:23:34 +02:00
goldsimon
2b93ef1d75 fixed bug #43790: Sending octet string of Length >255 from SNMP agent (patch by Manoj Kumar) 2015-08-20 08:12:50 +02:00
sg
05abfc8ded Fixed icmp.c after 1.4.0-based patch #45120 2015-08-19 22:14:37 +02:00
sg
de8e810792 fixed bug #45120: Broadcast & multiple interfaces handling 2015-08-19 20:55:03 +02:00
goldsimon
d104335501 dns.c: fixed compiler warning 2015-08-19 13:28:03 +02:00
goldsimon
7263cc675b fixed bug #45004: dns response without answer might be discarded 2015-08-19 10:33:42 +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
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
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
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
76e785dd5e Fix that pbuf_realloc() called mem_trim() for "custom" PBUF_RAM 2015-08-05 20:40:35 +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
13801ebd74 netif_find(): name parameter can be const 2015-08-03 13:47:25 +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
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
goldsimon
d3217718a9 Reverted fix for bug #38203 since it might be wrong 2015-06-23 09:20:06 +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
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
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
Edgar Bonet
cf15872b8d SNMP, Missing const qualifier on internet_nodes[] in mib2.c. 2015-05-05 13:02:30 +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
goldsimon
f01dc8cc34 more "const" fixes 2015-04-23 09:59:15 +02:00
goldsimon
00a46f104a changed IP_IS_V6_VAL() to take an instance, not a pointer (to get the _val() functions the same) 2015-04-23 07:26:29 +02:00
goldsimon
e60bc69515 added more missing casts 2015-04-23 07:24:45 +02:00
goldsimon
fbadb8354f fixed const'ness of syscontact/sysname/syslocation 2015-04-22 16:06:39 +02:00
goldsimon
02dee05c16 Fixed const'ness in snmp (design of sys contact/name/location and snmpenableauthentraps is broken!) 2015-04-22 15:39:56 +02:00
goldsimon
b16316ae37 fixed more (tiny) warnings... 2015-04-22 14:56:58 +02:00
goldsimon
f5077dc982 fixed some more missing casts... 2015-04-22 14:18:54 +02:00
goldsimon
f468c492b9 fixed missing casts found with msvc /Wall 2015-04-22 13:38:10 +02:00
goldsimon
5410838793 igmp.c: fixed -Waddress, removed dead code 2015-04-22 12:50:26 +02:00
goldsimon
beabd3c6b7 Added some macros with extension "_val" that work on actual instances and leave away the "if != NULL" check to get rid of gcc "-Waddress" warnings in the core code at least (I might not have caught all of them, yet) 2015-04-22 12:43:03 +02:00
goldsimon
a81c7bf04b fixed compiling icmp.c (variable has to be declared at the beginning of a scope) 2015-04-22 11:29:35 +02:00
goldsimon
902d190a11 Many const fixes throughout the stack (although these are not all, yet) 2015-04-22 10:29:43 +02:00
goldsimon
fe195a86cd dhcp: move declaration of "extern void dhcp_set_ntp_servers()" from dhcp.c to dhcp.h to make the function prototype known to implementers 2015-04-22 09:17:06 +02:00
Sylvain Rochet
632de523de Fixed PBUF_LINK_ENCAPSULATION_HLEN support
PBUF_LINK_ENCAPSULATION_HLEN support was introduced by 6ef7563f and
missed the fact that header size calculation/reservation using
computation like PBUF_LINK_HLEN + PBUF_IP_HLEN + ... are used all over
the source code. Hopefully fixed all of them.
2015-04-20 23:43:33 +02:00
sg
a5503df32b Fixed typo in dchp_inform (state is named DHCP_INFORMING, not DHCP_INFORM) 2015-04-19 12:30:20 +02:00
sg
e77e18f8c4 Worked on IPv6-only stack:
- prepared DNS;
- fixed compiling ppp.c
2015-04-13 21:24:40 +02:00
sg
69c337b31d Fixed ntoa/aton/ntop/pton definitions after making IPv4 optional 2015-04-13 20:52:42 +02:00
sg
c1c65777b6 worked on task #13480: added LWIP_IPV4 define - IPv4 can be disabled, leaving an IPv6-only stack (SNMP is still missing) 2015-04-12 10:43:46 +02:00
Sylvain Rochet
dcdb360a19 ip6_addr.c: fixed IPv6 ip6_addr_any value
0000:0000:0000:0000:0000:0000:0000:0000 instead of
0000:000a:0000:000b:0000:000c:0000:000d
2015-04-11 20:24:56 +02:00
goldsimon
1985579148 fixed compiler warning (signed/unsigned comparison) introduced when fixing bug #44766 2015-04-10 07:46:31 +02:00
goldsimon
d31dbc6798 Fixed constant initializer problem in ip_addr_t by having ip6 first 2015-04-10 07:41:40 +02:00
Sylvain Rochet
ffd45a2261 PPP, added new build dependencies in init.c 2015-04-10 01:00:08 +02:00
Sylvain Rochet
135631d29d fixed some obvious compiler warnings
lwip/src/include/lwip/autoip.h:52:1: error: C++ style comments are not allowed in ISO C90 [-Werror]
 //#include "lwip/udp.h"

lwip/src/core/ipv4/autoip.c:70:1: error: C++ style comments are not allowed in ISO C90 [-Werror]
 //#include "lwip/udp.h"

lwip/src/include/lwip/api.h:239:25: error: declaration of ‘lev’ shadows a previous local [-Werror=shadow]
   SYS_ARCH_DECL_PROTECT(lev); \
2015-04-09 23:27:36 +02:00
sg
ce7e31cd04 task #12722 (improve IPv4/v6 address handling): renamed ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP version;
ip_addr_t is used for all generic IP addresses for the API, ip(4/6)_addr_t are only used internally or when initializing netifs or when calling version-related functions
2015-04-09 22:21:15 +02:00
goldsimon
4ff1eb1890 fixed bug #44766 (LWIP_WND_SCALE: tcphdr->wnd was not scaled in two places) 2015-04-08 07:29:11 +02:00
goldsimon
7c47c917b5 dhcp: start discovery with short timeouts on network change, even if already discovering 2015-04-02 11:02:16 +02:00
sg
93fa268db1 used ip6_addr_t instead of struct ip6_addr, fix const'ness in ip6_route parameters 2015-03-24 21:30:22 +01:00
sg
521c92764d loopif is not required for loopback traffic any more but passed through any netif (ENABLE_LOOPBACK has to be enabled) (task #13515) 2015-03-24 21:22:19 +01:00
sg
71d121fab2 Added input & route hooks for IPv6 to stay in line with IPv4 2015-03-24 20:33:47 +01:00
sg
33d5e646e5 fixed bug #41318 (Bad memory ref in tcp_input() after tcp_close()) 2015-03-21 21:19:10 +01:00
sg
c00a62d37f fixed bug #38468 (tcp_sent() not called on half-open connection for data ACKed with the same ack as FIN) 2015-03-21 20:56:42 +01:00
sg
4463239d6e fixed bug #38204 (DHCP lease time not handled correctly) 2015-03-21 10:09:31 +01:00
sg
45d82c8d99 dhcp.c: removed dead code (#if 0) 2015-03-20 21:03:19 +01:00
sg
3e302e8683 fixed bug #38714 (Missing option and client address in DHCPRELEASE message) 2015-03-20 21:02:41 +01:00
sg
d6620f0f3a fixed bug #38203 (DHCP options are not recorded in all DHCP ack messages) 2015-03-20 20:29:04 +01:00
Sylvain Rochet
f7a5b71dba nd6: fixed compiler warnings
nd6.c: In function ‘nd6_send_rs’:
nd6.c:997:52: warning: suggest parentheses around ‘+’ inside ‘<<’ [-Wparentheses]
   p = pbuf_alloc(PBUF_IP, sizeof(struct rs_header) + lladdr_opt_len << 3, PBUF_RAM);
                                                    ^
nd6.c:998:58: warning: suggest parentheses around ‘+’ inside ‘<<’ [-Wparentheses]
   if ((p == NULL) || (p->len < (sizeof(struct rs_header) + lladdr_opt_len << 3))) {
2015-03-20 20:11:59 +01:00
Ivan Delamer
a4d14fc987 fix bug #44586: nd6_send_rs() pbuf size error 2015-03-20 09:04:22 -06:00
Sylvain Rochet
c8587e1242 tcp_in: typo fix. Fixes bug #4458944589. 2015-03-20 13:22:47 +01:00
Clint Sbisa
32f6e7e231 tcp: Fix ooseq processing when seqno is near 2^32
An edge case in out-of-sequence TCP packet processing did not use the
appropriate macro to check if the sender overran the recieve window.

Consequently, this case sometimes evaluated to true when it shouldn't, which
resulted in various bad behavior, including trying to resize a TCP buffer to 4
gigabytes.
2015-03-20 08:32:14 +01:00
Ivan Delamer
bc08c1d2b7 fixed bug #43095. Check actual link-layer address option length, versus
maximum length defined in struct. Bug would express itself if we have a
netif with 8-byte addresses and other netifs with 6-byte-or-less
addresses.
2015-03-18 13:21:39 -06:00