Commit Graph

4319 Commits

Author SHA1 Message Date
Dirk Ziegelmeier
8f8f56914b Fix bug #47731: IGMP state transition missing
Set state variable according to RFC 2236 on timeout in delaying member state
2016-10-01 21:27:00 +02:00
Dirk Ziegelmeier
b33070e0cf Add documentation for bug #49139: IGMP "All Systems" vs MLD "All Nodes" inconsistency 2016-10-01 21:13:05 +02:00
Dirk Ziegelmeier
8c52afb6ca igmp: Optimize code by always skipping the first entry in the linked groups list - it is always the "allsystems" entry 2016-10-01 17:28:36 +02:00
Dirk Ziegelmeier
df5a79966d Fix bug #48886: raw pcbs are not handled on netif address change 2016-10-01 17:13:33 +02:00
Dirk Ziegelmeier
149701b347 Fix bug #49218: pbuf_clen() overflow as a result of tcp_write concatenation
Let pbuf_clen() return u16_t
2016-09-30 09:04:36 +02:00
Dirk Ziegelmeier
682b82aad8 Improve documentation: Some words about multiple execution contexts in lwIP 2016-09-29 12:51:45 +02:00
Dirk Ziegelmeier
65796cd827 "Fix" bug #49078: lwip cannot establish ipv6 connection, because of failed to fill ipv6 source address in Neighbor Solicitation Message by adding a note to netif_add not to forget to create a link-local IPv6 address 2016-09-29 12:02:50 +02:00
Dirk Ziegelmeier
40846260b5 Add comment about possible definitions for non-standard functions 2016-09-29 10:44:53 +02:00
Dirk Ziegelmeier
af04864094 Remove non-standard strnlen() call in snmp_msg.c 2016-09-29 08:30:33 +02:00
Dirk Ziegelmeier
5ddd2aef4b Substitute custom itoa implementation mdns by lwip_itoa() and strlen() call 2016-09-29 08:25:57 +02:00
Dirk Ziegelmeier
17e6c9dd02 Add #include <string.h> in def.c since lwip_strnstr uses strlen and strcmp 2016-09-29 08:08:26 +02:00
Dirk Ziegelmeier
0e7f48d81c Fix compile of new functions in def.c - I accidentally put them in a #ifdef section
Thanks to Daniel Elstner
2016-09-28 22:26:55 +02:00
Dirk Ziegelmeier
461b3531c7 httpd.c: add missing default in case statement 2016-09-28 22:05:52 +02:00
Dirk Ziegelmeier
4144d54642 Fix implementation of lwip_itoa to take more parameters 2016-09-28 22:05:18 +02:00
Dirk Ziegelmeier
837b7b3f98 Fix comment in my last commit 2016-09-28 21:55:29 +02:00
Dirk Ziegelmeier
1f68b32485 Cleanup handling of non-standard functions in lwIP
- itoa
- strnicmp, stricmp/strcasecmp
- strnstr
Related to patch #9115: httpd.c: strcasecmp for GCC and stricmp for Windows
2016-09-28 21:52:11 +02:00
Dirk Ziegelmeier
f8d19e28de Minor: Documentation updates 2016-09-28 20:58:02 +02:00
Erik Ekman
f3cec74bd6 mdns: Use macro to get mdns_host from netif v2
Add missing )
2016-09-28 18:15:11 +02:00
Erik Ekman
87e815030c mdns: Use macro to get mdns_host from netif 2016-09-28 18:00:48 +02:00
Erik Ekman
78498981e2 mdns: Update error message after argument type changed
Method argument is no longer netif, but a mdns_host
2016-09-28 18:00:44 +02:00
Dirk Ziegelmeier
633696c153 Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6
- rename IP4_ADDR_ANY to IP4_ADDR_ANY4
- IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
2016-09-28 12:56:57 +02:00
goldsimon
0e2354e658 Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer 2016-09-28 12:53:07 +02:00
Dirk Ziegelmeier
5d811d799c Minor: Documentation updates 2016-09-27 21:18:03 +02:00
Dirk Ziegelmeier
6abcd00f71 Convert IP address type numbers to an enum to improve documentation 2016-09-27 09:46:51 +02:00
Dirk Ziegelmeier
97b774ceb9 Minor: Documentation updates 2016-09-26 21:45:29 +02:00
Daniel Elstner
2f085aa441 ND6: Join/leave groups directly on the netif 2016-09-26 11:44:00 +02:00
Daniel Elstner
354e385453 Fix infinite loop in new MLD6 code 2016-09-26 11:43:59 +02:00
Dirk Ziegelmeier
c7c6b7ce93 Rework IGMP and MLD6 code to store group info per-netif.
Reasoning:
- Makes code in single-netif case perform better and smaller
- IGMP / MLD6 code is a little bit easier to read and understand
- Easier to get multicast groups per netif when implementing drivers

Downside: In multi-netif mode, there are two more pointers on each netif, even if IGMP/MLD6 is not used on it. But these systems should not be so memory-constrained that this will matter.
2016-09-21 13:33:33 +02:00
Dirk Ziegelmeier
c25de8f317 Update comment in MDNS and pbuf.c 2016-09-21 12:37:31 +02:00
Daniel Elstner
c9bae5ea9b Fix bug #49134: Do not announce invalid IPv4 address via mDNS
In a dual stack configuration it is not really feasible to wait
until the IPv4 address is valid before starting the mDNS responder.
If there is no DHCPv4 server in the network, the IPv4 address may
never become valid, which should however not preclude IPv6 mDNS
from working.
2016-09-21 12:31:13 +02:00
Dirk Ziegelmeier
dbd847b70c Fix bugfix for bug #49136: No SNMPv2 SetRequest response when OID does not exist
Last commit broke SNMPv1 answers
2016-09-20 14:28:40 +02:00
Dirk Ziegelmeier
19e2780656 Fix bug #49136: No SNMPv2 SetRequest response when OID does not exist 2016-09-20 14:06:20 +02:00
Dirk Ziegelmeier
eb3a08308d Improve my last docs 2016-09-20 09:14:32 +02:00
Dirk Ziegelmeier
470dae613e Documentation: Add example for zero-copy RX using custom PBUF 2016-09-20 09:03:49 +02:00
Daniel Elstner
22907c7b27 bug #74921: check prefix_length, not length 2016-09-19 18:38:05 +02:00
Dirk Ziegelmeier
623f9ce046 Remove one debug message from Daniel's patch 2016-09-19 12:32:43 +02:00
Daniel Elstner
4d4710dadf Bug #49125 addendum: Remove group from list before callback
When leaving a multicast group, remove the group from the list
before invoking the MAC filter callback. This avoids the need
for the callee to skip over the group that is about to be deleted.
2016-09-19 12:26:51 +02:00
Dirk Ziegelmeier
2facd2d64d Apply modified patch from Daniel Elstner to fix bug #49124: mDNS should not use snprintf() 2016-09-19 12:20:20 +02:00
Dirk Ziegelmeier
ee4cd45c98 Fix bug #49125: Need a way to iterate multicast groups for MAC filtering
-> let list heads be a public symbol
2016-09-19 08:45:57 +02:00
Dirk Ziegelmeier
58c8e0f8ca Implement request by Marco Veeneman: Make snmp_send_trap() public 2016-09-15 10:41:05 +02:00
Dirk Ziegelmeier
8dbd1abdc4 Minor coding style fixes while reading SNMP code 2016-09-12 12:55:24 +02:00
Dirk Ziegelmeier
ef0dc65515 Fix GCC warning "invalid suffix on literal; C++11 requires a space between literal and string macro" in arch.h. Pointed out by Thomas Nittel. 2016-09-12 07:38:06 +02:00
Dirk Ziegelmeier
8cd43a3dd9 Documentation: Add one more note PCB is already freed in tcp_err callback. 2016-09-09 17:36:49 +02:00
Erik Ekman
4a73bcbc65 mdns: Revert answer count patch
Answers written to outpackets can be additional answers
or normal answers to questions.
2016-09-09 17:04:12 +02:00
Axel Lin
f38705c38c mdns: Update answers counter in mdns_add_answer rather than each caller
This simplifies the code and less error prone.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-09-09 16:42:49 +02:00
Joel Cunningham
b7c2553b46 bug #48964: Make PBUF_POOL sanity checks contingent on PBUF_POOL_SIZE
This commit adds support to the sanity checks in init.c to ensure that
PBUF_POOL is in use

In ports with drivers/netifs that use PBUF_REF for the RX pathway, there
is no need for the PBUF_POOL memory pool.  This allows the port to define
PBUF_POOL_SIZE to 0
2016-09-07 09:11:19 -05:00
Axel Lin
f8a95aa27f dns: Drop unnecessary txid variable in dns_check_entry
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-09-07 14:56:01 +02:00
Dirk Ziegelmeier
d66442ba91 Fix compile when TCP, UDP and RAW are disabled 2016-09-07 08:11:30 +02:00
Dirk Ziegelmeier
aeae4e91db Fix compile when UDP is disabled 2016-09-06 12:30:15 +02:00
sg
34682facd1 Remove ip4_frag IP_FRAG_USES_STATIC_BUF code: nearly the same as the other code, but IP_FRAG_USES_STATIC_BUF doesn't work when queuing pbufs 2016-08-31 21:00:10 +02:00
Dirk Ziegelmeier
ac6b64cf66 Implement a more readable fix for pbuf_memcmp than my last fix 2016-08-31 20:24:37 +02:00
Dirk Ziegelmeier
b944ceb89d Fix compile when LWIP_NUM_NETIF_CLIENT_DATA == 0 and AUTOIP or DHCP are enabled 2016-08-31 20:17:04 +02:00
Axel Lin
ab8a1a0430 netbuf: Fixup a copule LWIP_ERROR messages
Fix trivial copy-n-paste mistake.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2016-08-31 12:23:12 +02:00
Dirk Ziegelmeier
4325aca0f7 Fix pbuf_memcmp() implementation by using pbuf_try_get_at() instead of pbuf_get_at(). Payload out-of-bounds access was not handled correctly. 2016-08-31 10:35:42 +02:00
sg
23147b0e21 added more out of range checks to dns_recv() (see bug #48924) 2016-08-30 22:18:10 +02:00
Dirk Ziegelmeier
9078f31544 Minor: memcpy -> MEMCPY / SMEMCPY 2016-08-30 21:56:09 +02:00
sg
a08ed9148d added pbuf_try_get_at() (much like pbuf_get_at() but can return out-of-pbuf error) 2016-08-30 21:35:37 +02:00
Dirk Ziegelmeier
8d45162a59 Fix usage of uninitialized data in dhcp.c by checking pbuf_copy_partial() return value 2016-08-30 21:33:43 +02:00
Dirk Ziegelmeier
f5135b05d9 Minor coding style fixes in mdns.c 2016-08-30 21:21:32 +02:00
Dirk Ziegelmeier
2137f49d32 Fix usage of uninitialized data in nd6.c because of unchecked pbuf_copy_partial() return value 2016-08-30 21:20:58 +02:00
Dirk Ziegelmeier
aef3d2cb87 Minor coding style fix in pbuf.c 2016-08-30 21:09:24 +02:00
Dirk Ziegelmeier
840d1e60fa Fix bug #48924: Potential out of bound reads in DNS codes of lwip project by adding checks for pbuf_copy_partial() return values.
Add some comments to clarify handling of untrusted network data handling.
2016-08-30 21:09:24 +02:00
Axel Lin
198fa5dbfa Remove duplicated include for lwip/inet_chksum.h
Include it once is enough.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2016-08-30 09:47:43 +02:00
Axel Lin
ef827e85b8 apps/mdns: Fixup LWIP_ERROR message in mdns_build_host_domain
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2016-08-30 08:35:40 +02:00
Dirk Ziegelmeier
e545262d98 Remove superfluous parameter from mdns_domain_debug_print() 2016-08-29 19:32:39 +02:00
Dirk Ziegelmeier
fb62e9350f Fix wrong sizeof() and remove superfluous NULL pointer check in MDNS 2016-08-29 19:15:22 +02:00
Axel Lin
db6aa82a10 memp: Fix comment for memp_overflow_check_element_overflow/underflow
These functions now take desc rather than memp_type as second parameter.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-28 20:33:57 +02:00
Joel Cunningham
c9dff6b5aa Correct TCP_OOSEQ_MAX_* opt.h documentation
This corrects documentation on TCP_OOSEQ_MAX_BYTES and _PBUFS to list
their dependency on TCP_QUEUE_OOSEQ==1 (out of order sequence queueing
enabled) rather than ==0 (disabled)
2016-08-26 09:33:14 -05:00
Dirk Ziegelmeier
4b45baee10 Add some dual-stack notes to documentation 2016-08-26 15:58:18 +02:00
Dirk Ziegelmeier
05a6d82fa1 Let comment in pbuf.h be consistent with provided example function 2016-08-26 15:39:15 +02:00
Dirk Ziegelmeier
0d510dd66d Add API macros for netif client data handling and update documentation accordingly 2016-08-26 11:21:49 +02:00
Dirk Ziegelmeier
537bd836c9 Minor: More documentation updates 2016-08-25 22:23:11 +02:00
Dirk Ziegelmeier
57468b8a30 Minor: Several documentation updates 2016-08-25 22:04:04 +02:00
sg
452f5d6296 fix tcpip.c for LWIP_TIMERS==0 2016-08-25 21:15:26 +02:00
Dirk Ziegelmeier
2980a12373 Fix ntohs -> htons in ethernet.c 2016-08-25 14:25:16 +02:00
goldsimon
89aa4e7d79 fixed bug #47921: link-local prefix in router advertisement must not be processes for SLAAC (patch by abhishek ambure) 2016-08-25 14:21:30 +02:00
goldsimon
3e23eb764b fixed compiling TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS (local variable 'p' was hidden) 2016-08-25 14:21:29 +02:00
Dirk Ziegelmeier
aeb3834219 Add debug assert to my last commit and improve comment in opt.h 2016-08-25 14:12:49 +02:00
Dirk Ziegelmeier
475d49440c Fix handling of LWIP_HOOK_VLAN_SET(). Previous implementation supplied uninitialized arguments to the macro (struct eth_hdr).
Change macro signature to be universal: netif, pbuf, src, dst, eth_type - whatever the user needs to decide about VLAN header.
Return value <0 means "no VLAN header", 0 <= return_value <= 0xFFFF -> value is prio_vid of header.
Clean up ethernet_output function to be more readable.
2016-08-25 14:07:35 +02:00
Axel Lin
a2ca85a260 tcp: Make tcp_state_str/tcp_backoff/tcp_persist_backoff static
They are only referenced in tcp.c, so make them static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-25 11:20:10 +02:00
sg
4c390ad39c update netif address change triggers to tpc & udp to work with IPv6, too 2016-08-24 20:51:05 +02:00
Erik Ekman
a1db05c11e Fix const argument warning in netif_ip6_addr_set
../../../../../lwip/src/netif/ppp/ppp.c:1276:37: error: passing
      'const ip6_addr_t *' (aka 'const struct ip6_addr *') to parameter of type
      'ip6_addr_t *' (aka 'struct ip6_addr *') discards qualifiers
      [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6);
                                    ^~~~~~~~~~~~~
../../../../../lwip/src/include/lwip/ip_addr.h:340:24: note: expanded from macro
      'IP6_ADDR_ANY6'
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../lwip/src/include/lwip/netif.h:436:73: note: passing argument to
      parameter 'addr6' here
void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, ip6_addr_t *addr6);
2016-08-24 14:41:48 +02:00
Axel Lin
bf5866b27d tcp: Prevents a 0 sized (invalid) backlog
commit 44e1a2d8e2 accidently includes below changes in tcp_listen_with_backlog
 -  tcp_backlog_set(lpcb, backlog);
 +  lpcb->backlog = backlog;

Thus pass 0 to the backlog parameter of netconn_listen_with_backlog() fails.

Fixes: 44e1a2d8e2 ("define tcp_backlog_set() as dummy-define when backlog feature is disable")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-24 12:20:28 +02:00
goldsimon
298ec340e5 set netif IPv6 address & state via function to implement change triggers (task #13517) 2016-08-24 09:19:53 +02:00
goldsimon
1ba0e17157 ip6_addr: a valid address is either preferred or deprecated, no need to reserve 3 bits for that 2016-08-24 09:06:48 +02:00
Dirk Ziegelmeier
43ddf6eee6 Fix debug strings in ethernet_output 2016-08-24 08:46:32 +02:00
Dirk Ziegelmeier
8426dfa14d Remove misleading comments from udp_send() and raw_send(). A pbuf may be added automatically in front of the chain to be able to send PBUF_REFs 2016-08-24 08:45:37 +02:00
Dirk Ziegelmeier
6fc7f84497 Minor: documentation updates 2016-08-24 08:19:51 +02:00
Dirk Ziegelmeier
831b7fc7d3 Add note to pbuf_type about correct TX/RX type selection 2016-08-24 08:09:03 +02:00
Dirk Ziegelmeier
d9b0236525 Fix MDNS did not allocate TX packets from RAM but from POOL 2016-08-24 08:04:04 +02:00
Dirk Ziegelmeier
e78bc41116 Document ethernet level functions 2016-08-24 08:01:36 +02:00
Dirk Ziegelmeier
c719c466b3 Remove SIZEOF_ETHARP_PACKET_TX #define, it is not needed any more after my last cleanups 2016-08-23 20:41:37 +02:00
Dirk Ziegelmeier
31778193da Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_input() to use ethernet_output() 2016-08-23 17:23:21 +02:00
Dirk Ziegelmeier
6caa7b9927 Cleanup etharp_arp_input() signature to match the sig of other input functions (pbuf, netif). Rename to etharp_input() 2016-08-23 17:03:51 +02:00
Dirk Ziegelmeier
979bee386c Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_raw() to use ethernet_output() 2016-08-23 16:58:17 +02:00
Dirk Ziegelmeier
d2f52e19d5 Fix doxygen comment in ethernet.c 2016-08-23 16:09:32 +02:00
Dirk Ziegelmeier
56dc574bed Fix comment in pbuf layer description 2016-08-23 16:07:48 +02:00
goldsimon
e4c74109cd fixed bug #47652: there is always a delay to send the first Neighbor Solicitation for the new add INCOMPLETE state neighbor entry 2016-08-23 15:50:48 +02:00
goldsimon
fd5b34ae43 ip4_forward(): fixed compiling IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1 2016-08-23 15:26:05 +02:00
goldsimon
306171c93b DHCP: fixed compiling LWIP_DHCP_BOOTP_FILE==1 2016-08-23 15:25:39 +02:00