Dirk Ziegelmeier
d5778bad2f
No need for dual-stack code in ip4.c and icmp.c -> use ip4 only versions
2016-02-26 22:50:20 +01:00
Dirk Ziegelmeier
a5214abd04
udp: udp_send and udp_send_chksum: Check for PCB NULL pointer and PCB must not be the new IP_ANY_TYPE, but a real IPv4 and IPv6 address
2016-02-26 09:20:50 +01:00
goldsimon
bf8bcfafe2
revert accidentally committed comment from a649a3eb50
2016-02-26 08:59:50 +01:00
Joel Cunningham
8cb64698aa
Allow backlog to be updated
...
This commit adds support to the sockets and netconn layer to update the
backlog by calling listen when the netconn is already in the listen state.
When backlog is not enabled, the call returns successfully
This commit also introduces a macro for setting the backlog value that
prevents a 0 sized (invalid) backlog
2016-02-25 15:19:52 -06:00
sg
a649a3eb50
dual-stack fix: moved common definitions/code for ethernet used by etharp and ethip6 to new files ethernet.h/.c
2016-02-25 22:10:28 +01:00
Dirk Ziegelmeier
fd891081c4
minor: Cleanups in raw/tcp/udp code by using macros and reducing #ifdefs
2016-02-24 23:04:25 +01:00
Dirk Ziegelmeier
953b7bdd59
Implement UDP dual-stack PCB support
...
Create special IP address type "IPADDR_TYPE_ANY" for it.
SNMP uses new feature in non-netconn mode.
TODO: Same for TCP & RAW, adapt NETCONN to use this feature
2016-02-24 22:37:01 +01:00
sg
1dde3d6e56
Fixed bug #46524 : "Device as dhcp server does not work after upgrade to lwip-1.4.1"
2016-02-24 22:13:58 +01:00
sg
ec49b68b38
minor: udp_input/local_match: coding style, added comments
2016-02-24 22:04:59 +01:00
Dirk Ziegelmeier
ac4b089b18
udp.c: Further udp_input simplifications
...
- Move local PCB matching code in a function that can be reused in SO_REUSE && SO_REUSE_RXTOALL case.
- Some checks have been written in the dual-stack version and then repeated with the ipv6-only version. Example:
IPv6 only: ip6_addr_ismulticast(ip6_current_dest_addr())
IPv4 AND IPv6: ip_addr_ismulticast(ip_current_dest_addr())
2016-02-24 19:57:20 +01:00
Dirk Ziegelmeier
005c196ed8
udp.c: Simplify and cleanup input PCB matching
2016-02-24 19:13:30 +01:00
Dirk Ziegelmeier
17fad79f71
Two compile fixes after eliminating isipv6 member in PCBs
2016-02-22 17:07:17 +01:00
Dirk Ziegelmeier
c805843e64
Change signature of ip_output, ip_output_if, ip_output_if_src, ip_output_hinted, ip_route, ip_netif_get_local_ip, ip_route_get_local_ip and tcp_eff_send_mss not to take an isipv6 parameter. Use the IP version of the destination address instead.
2016-02-22 13:38:40 +01:00
Dirk Ziegelmeier
880f1008d6
Together with Simon: Eliminate last instances of isipv6 member in pcbs;
...
Don't allow NULL pointers (IPv4 ANY) in connect() and sendto() functions as destinations since this does not make sense.
2016-02-22 13:03:51 +01:00
Dirk Ziegelmeier
be9cd800b0
Review with Simon: Init TCP/UDP/RAW PCBs with correct IP types in _new functions to make my changes work correct
2016-02-22 11:16:13 +01:00
Dirk Ziegelmeier
0106cf7ae0
Review with Simon: Remove dead code (since 2003)
2016-02-22 10:18:19 +01:00
Dirk Ziegelmeier
50303eea23
Reduce PCB_ISIPV6 macro usage some more
2016-02-21 19:59:08 +01:00
Dirk Ziegelmeier
339e82d7aa
Eliminate IP_PCB_IPVER_EQ macro
2016-02-21 19:45:51 +01:00
Dirk Ziegelmeier
5a25652c21
Eliminate IP_PCB_IPVER_INPUT_MATCH macro
2016-02-21 19:21:36 +01:00
Dirk Ziegelmeier
8f675c37fc
Reduce usage of PCB IP version flag in UDP code. Maybe we can figure out a good way for dual-stack UDP when we manage to remove the flag (nearly) entirely from the code.
2016-02-20 20:54:58 +01:00
Dirk Ziegelmeier
5809b01388
Reduce usage of PCB IP version flag in raw and tcp code. Maybe we can figure out a good way for dual-stack UDP when we manage to remove the flag (nearly) entirely from the code.
2016-02-20 20:40:04 +01:00
Dirk Ziegelmeier
10edba936b
Fix tcp pcb access after it was freed in tcp.c - found by Coverity
2016-02-19 23:28:09 +01:00
goldsimon
e4cac595c2
Check TCP_SNDLOWAT for too high value (near u16_t overflow) - fixes bug #46948
2016-02-18 09:36:55 +01:00
Dirk Ziegelmeier
24bc77a935
Found some struct instances that can be const
2016-02-16 22:31:59 +01:00
Dirk Ziegelmeier
273d609bac
mem.c: Fix unintended sign extension (found by Coverity)
...
sign_extension: Suspicious implicit sign extension: count with type unsigned short (16 bits, unsigned) is promoted in count * size to type int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If count * size is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
2016-02-10 21:21:08 +01:00
Dirk Ziegelmeier
288b4564e4
DNS: Fix potential array out of bounds access. Variable nanswers may contain bogus values. (found by Coverity)
2016-02-10 20:41:31 +01:00
Dirk Ziegelmeier
1c1587eef6
ICMP: Fix responses were always sent to default netif because of uninitialized source IP (found by Coverity)
2016-02-10 20:35:58 +01:00
Dirk Ziegelmeier
11b810721a
ICMP: Fix unused value in icmp_input (found by Coverity)
2016-02-10 20:34:44 +01:00
Dirk Ziegelmeier
222155d7e2
pbuf: Make pbuf_skip function public, so it can be used in SNMP code
2016-02-03 08:37:04 +01:00
Axel Lin
f411a34af5
stats: Add proper #if guard to prevent unused-variable warning for memp_names
...
The usages of memp_names are under either LWIP_DEBUG in stats_init,
or under LWIP_STATS_DISPLAY in stats_display_memp.
Fix below build warning:
lwip/src/core/stats.c:53:21: error: 'memp_names' defined but not used [-Werror=unused-variable]
static const char * memp_names[] = {
^
cc1: all warnings being treated as errors
Reported-by: David Fernandez
Fixes: 2f2a75a6d9fd ("stats: Move memp_names table out of stats_init/stats_display_memp functions")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-31 13:48:38 +01:00
Axel Lin
515a4cad73
Clear addr_hint pointer after calling ip_output_if() in tcp_zero_window_probe()
...
This was missed in commit aa0e41c389
("task #12178 : hardware checksum capabilities can be configured per netif"),
fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-29 09:21:58 +01:00
Stephan Linz
2c31beb6e7
IPv4: fix some meaningless debug messages
...
Signed-off-by: Stephan Linz <linz@li-pro.net>
2016-01-18 21:34:13 +01:00
Axel Lin
fe2cfe2dba
raw: Fix build error
...
IP6_HLEN is only defined when LWIP_IPV6, IP_HLEN is only defined when LWIP_IPV4.
This fixes build error in !LWIP_IPV4 || !LWIP_IPV6 cases.
Fixes: f2c7e9c939
("raw: Remove unnecessary #if guard around PCB_ISIPV6() calls")
Reported-by: Erik Ekman
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-18 16:02:01 +01:00
Stephan Linz
80375e68dd
ip_frag: fix compiler warnings, unused variable
...
In case of IP_REASS_FREE_OLDEST==0, the argument clen of
ip_reass_enqueue_new_datagram() will not used and leads
the compiler to a warning.
Signed-off-by: Stephan Linz <linz@li-pro.net>
2016-01-18 11:55:54 +01:00
Axel Lin
f2c7e9c939
raw: Remove unnecessary #if guard around PCB_ISIPV6() calls
...
PCB_ISIPV6() macro is well defined for all cases (LWIP_IPV4 && LWIP_IPV6,
LWIP_IPV4 only and LWIP_IPV6 only), thus remove the unnecessary #if guard
around PCB_ISIPV6() calls.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-18 11:55:06 +01:00
Axel Lin
c221361874
stats: Move memp_names table out of stats_init/stats_display_memp functions
...
This makes the code simpler with better readability.
Also make memp_names static because it's only referenced by stats.c.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-15 11:38:03 +01:00
Axel Lin
70ebeda7ed
memp: Simplify implementation of memp_overflow_check_all
...
We don't really care the order of overflow/underflow checking because if
any checking fails we got assertion.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-15 11:38:02 +01:00
Dirk Ziegelmeier
70487a43d4
Apply patch #8854 : dns: Simplify #ifdef guard around dns_gethostbyname_addrtype from Axel Lin
...
+ Minor compile fix from me
Patch makes the code a tiny bit less lightweight (add a parameter in dns_gethostbyname which is then not used in dns_gethostbyname_addrtype) but it makes the code more readable.
2016-01-13 19:52:08 +01:00
Axel Lin
a93ae2558f
tcp_rexmit_rto: Remove superfluous #if TCP_OVERSIZE guard
...
TCP_OVERSIZE_DBGCHECK already implies TCP_OVERSIZE is set.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-13 19:07:08 +01:00
Axel Lin
c2a74b767b
udp_bind: Omit checking for the same port if no port specified
...
No port specified means to use a random port.
udp_new_port() returns a new (free) local UDP port number on success.
So in this case we don't need iterating all lists to test if the port
number is used, udp_new_port() alreay ensures the port is not used.
Move the code checking for double bind and rebind of the same pcb earlier,
as this checking is necessary in all cases.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-13 09:05:36 +01:00
Dirk Ziegelmeier
123c8dbd6a
Fix bug #46837 Don't send dhcp_release message in dhcp_release function
2016-01-13 08:54:54 +01:00
Axel Lin
9f3aab6a62
tcp_out: Use LWIP_DBG_LEVEL_SERIOUS instead of hard coded number
...
Trivial clean up to avoid using hard coded number.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-11 13:22:51 +01:00
Axel Lin
156ad0dbf5
udp_bind: Fix the logic to check both pcbs have REUSEADDR set
...
The code for #if SO_REUSE case does not match the comment.
By default, we don't allow to bind to a port that any other udp
PCB is already bound to, unless *all* PCBs with that port have tha
REUSEADDR flag set.
Which means we want to omit checking for the same port if both pcbs
have REUSEADDR set. Fix the logic accordingly.
Fixes: d0348e0c60
("task #6995 : Implement SO_REUSEADDR (correctly)")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-11 12:19:13 +01:00
Axel Lin
5056d375f2
tcp_bind/tcp_connect: Omit checking for the same port if no port specified
...
No port specified means to use a random port.
tcp_new_port() returns a new (free) local TCP port number on success.
So in this case we don't need iterating all lists to test if the port
number is used, tcp_new_port() alreay ensures the port is not used.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-11 12:16:27 +01:00
Axel Lin
708beb4874
udp_bind: Allocate a random port earlier to correctly detect port conflict
...
Current code does not correctly detect port conflict if no port specified
because it checks ipcb->local_port == port before udp_new_port().
Fix it by allocating a random port earlier.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-09 10:14:09 +01:00
Joel Cunningham
a82c6122d5
Correct comment word usage in ip4_frag.c
...
This corrects word usage in ip4_frag.c:
* 'On' was used when it should have been 'one'
* 'Whole' was used when it should have 'hole'
2015-12-08 10:13:56 -06:00
Axel Lin
2e56f2d780
igmp: Optimize the implementation of igmp_start_timer
...
When LWIP_RAND is defined, calling LWIP_RAND() is not necessary if max_time <= 2
because group->timer will be set to 1 anyway.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-06 21:47:09 +01:00
Axel Lin
2562d637cd
tcp_out: Use LWIP_DBG_LEVEL_SERIOUS instead of magic number
...
Trivial clean up to avoid using magic number.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-06 21:38:12 +01:00
Axel Lin
a21144b834
memp: Fixup LWIP_HOOK_MEMP_AVAILABLE() hook
...
I got below build warning if LWIP_HOOK_MEMP_AVAILABLE is defined.
src/core/memp.c: In function 'memp_free_pool':
src/core/memp.c:352:16: warning: variable 'old_first' set but not used [-Wunused-but-set-variable]
struct memp *old_first;
^
src/core/memp.c: In function 'memp_free':
src/core/memp.c:413:6: warning: 'old_first' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (old_first == NULL) {
The LWIP_HOOK_MEMP_AVAILABLE() hook does not work, fix it.
Fixes: c838e1ed5b
("Implement possibility to declare private memory pools")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-05 21:32:14 +01:00
Axel Lin
7f92660598
icmp: Fix memory leak in icmp_input() error paths
...
Ensure the newly allocated packet buffer is freed in error paths.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-05 21:25:15 +01:00
Axel Lin
a709041b8b
Remove unnecessary p->len checking for pbuf_alloc calls with PBUF_RAM type
...
pbuf_alloc() for PBUF_RAM type always return big enough memory on success.
So checking p->len is not necessary. Testing if p is NULL or not is enough.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-05 21:21:59 +01:00
Axel Lin
bd4c4b5959
Use SYS_ARCH_SET macro at appropriate places
...
Use SYS_ARCH_SET to simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-02 22:51:08 +01:00
Axel Lin
fb6d0f9006
ipaddr_aton: Avoid duplicate code to handle IPv4 address string conversion
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-02 22:51:00 +01:00
Axel Lin
6e863ecb50
dns: Remove always true test in dns_alloc_random_port
...
The only way to exit the do-while loop is err != ERR_USE.
Thus get rid of the always true test.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-02 22:37:26 +01:00
Axel Lin
764bf251cd
igmp: Drop unneeded initialization for *group in igmp_lookup_group()
...
It's assigned to the return value of igmp_lookfor_group() immediately.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-02 22:32:50 +01:00
Axel Lin
91586bc6f6
Drop #if TCP_DEBUG guard around tcp_debug_print_state calls
...
The #if TCP_DEBUG guard can be removed because tcp_debug_print_state()
print nothing if !TCP_DEBUG.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-12-02 22:32:42 +01:00
Axel Lin
f971fb921e
Simplify testing minimum priority in tcp_kill_prio()
...
Simplify the code a bit by setting mprio = LWIP_MIN(TCP_PRIO_MAX, prio)
before the for loop.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-11-20 21:41:14 +01:00
Axel Lin
c730e45f0c
Trivial comment fix about calling tcp_slowtmr
...
Trivial typo fix.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-11-20 21:36:38 +01:00
Axel Lin
5c27429958
memp: Fix if MEMP_OVERFLOW_CHECK guard in memp_free_pool
...
Current code already checks memp_overflow_check_all() in memp_free() if
MEMP_OVERFLOW_CHECK >= 2. So in memp_free_pool(), it should use
MEMP_OVERFLOW_CHECK == 1 instead.
Fixes: c838e1ed5b
("Implement possibility to declare private memory pools")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-11-19 22:06:42 +01:00
Axel Lin
9c6708513a
Drop unnecessary NULL test for h->next->next in memp_sanity
...
The h will point to NULL if h->next->next is NULL anyway.
So remove the unnecessary NULL test for h->next->next in each iteration.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-11-19 07:23:55 +01:00
Axel Lin
21b9b5e741
Slightly improve raw_remove()/udp_remove() implementation
...
There should be no duplicate pcb in raw_pcbs/udp_pcbs list.
So the implementation of raw_remove()/udp_remove() can break from the for
loop once the target pcb is found and removed from the list.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-11-19 07:21:00 +01:00
goldsimon
98b9d31f24
Fixed compiling with LWIP_TCP==0
2015-11-16 09:37:56 +01:00
Axel Lin
668d461104
dns: Fix dns_alloc_pcb for reuse an existing one case
...
The logic to use an already existing pcb is wrong because the idx never
advanced in the for loop, so it keep checking the same dns_pcbs[idx] for
each loop iteration. Fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2015-11-16 09:09:31 +01:00
Dirk Ziegelmeier
6203737093
Rename snmp_mib2.h to snmp.h so source compatibility for user netif implementations is preserved
2015-11-12 21:25:42 +01:00
Dirk Ziegelmeier
5f642eb3e3
Completely decouple SNMP stack from lwIP core by using private memory pools;
...
Move SNMP stack to apps;
API breaking change: Users need to call snmp_init() now!
2015-11-12 21:21:14 +01:00
goldsimon
92a241a29e
Fixed bug #46365 : tcp_accept_null() should call tcp_abort()
2015-11-12 10:40:49 +01:00
Dirk Ziegelmeier
c838e1ed5b
Implement possibility to declare private memory pools. This is useful to decouple some apps from the core (SNMP stack) or make contrib app useage simpler (httpserver_raw) .
2015-11-12 08:45:04 +01:00
Dirk Ziegelmeier
d38db89626
Export tcp_pcb_lists from tcp.c - can be used in SNMP code to implement MIB2 tcp connection tables
2015-11-12 08:09:44 +01:00
Dirk Ziegelmeier
3f0b1e2cdc
Remove global variable used in macros, it can be declared locally.
2015-11-12 08:07:22 +01:00
sg
c12fa7b4c4
started to move "private" header files containing implementation details to "lwip/priv/" include directory to seperate the API from the implementation.
2015-10-09 21:58:58 +02:00
sg
b32751a693
moved dhcp.c to src/core/ipv4/ since it is IPv4 only
2015-10-09 21:06:08 +02:00
goldsimon
65efeec4e9
fixed bug #46145 tcp_send_empty_ack() uses wrong netif with LWIP_HOOK_IP4_ROUTE_SRC (patch by Milan Cermak)
2015-10-07 14:56:25 +02:00
goldsimon
15bb334e81
SNMP: use PBUF_RAM for sending, PBUF_POOL is mostly used for RX only (if this isn't followed, tcp can get stuck when ACKs don't come through - unless some PBUF_POOL pbufs are reserved for such RX)
2015-10-07 10:41:03 +02:00
goldsimon
77f906376e
minor: fixed coding style (lwip style)
2015-10-07 10:36:50 +02:00
goldsimon
9b22f167f1
minor: mib2: removed some blocks by defining common variables above the switch
2015-10-07 10:13:20 +02:00
goldsimon
b401f42520
minor: fixed coding style (lwip style)
2015-10-07 10:03:12 +02:00
goldsimon
2949449e25
minor: SNMP: fixed coding style (lwip style)
2015-10-07 10:01:23 +02:00
sg
2b971400fa
minor: coding style
2015-10-06 21:57:40 +02:00
sg
22df34fc70
minor/coding style: removed spaces before line ending (from file header)
2015-10-06 21:13:15 +02:00
sg
490581a0eb
minor/coding style: removed spaces before line ending
2015-10-06 21:08:28 +02:00
goldsimon
0737cfb84e
Fixed bug #46128 (patch by Kerem Hadimli)
2015-10-06 12:42:25 +02:00
Erik Ekman
f80d0dab08
Remove old comments about DHCP setting netif up
2015-10-03 21:31:48 +02:00
sg
fb1ac8d766
snmp mib2: more const
2015-10-03 20:34:56 +02:00
Dirk Ziegelmeier
bc47bd28ab
snmp mib2: more nodes can be const
2015-10-03 20:34:09 +02:00
Dirk Ziegelmeier
5cf4771397
snmp: eliminiate mib_ram_array_node (it is not necessary: to the agent, the nodes may be const since the actual mib implementation knows the structures behind the nodes which do not have to be const)
2015-10-03 20:27:49 +02:00
sg
8891b277c6
snmp: hopefully fixed all alignment warnings introduced today. unfortunately, gcc does not warn about them when compiling for x86
2015-10-02 21:59:40 +02:00
goldsimon
e4abd4234d
removed comma before }
2015-10-02 13:26:11 +02:00
goldsimon
fe33fd6d86
snmp: cleaned up mib_* structs: "base" class 'struct mib_node' only needs the type, get/set functions are not used on array/external nodes (only on scalar/listroot nodes)
2015-10-02 12:33:45 +02:00
goldsimon
bf75ace695
snmp: combine oid and node pointers in array entries
2015-10-02 10:53:17 +02:00
goldsimon
180ed573a5
snmp_trap_dst_ip_set: ip_addr_t pointer can be const
2015-10-02 09:58:31 +02:00
goldsimon
a9b6b5b704
adapt init.c to moved declaration of snmp_init
2015-10-02 09:57:15 +02:00
goldsimon
30445712a5
snmp: make mib_scalar_node a "derived" struct like all other nodes
2015-10-02 09:56:00 +02:00
sg
3312983b27
Make LWIP_DNS_SECURE and its possible values known in opt.h, remove default initialization of DNS server
2015-10-01 21:38:39 +02:00
sg
fecd1bde83
ip4_route: fixed checking twice for a valid default_netif, fixed checking loopback traffic before checking for a valid default netif
2015-10-01 21:17:59 +02:00
goldsimon
0176e03e36
mib2: one more '};' -> '}'
2015-10-01 10:21:52 +02:00
Dirk Ziegelmeier
9957cd4a2a
fixed bug #46089 : snmp: race condition on length change between get_object_def() and get_value()
2015-10-01 10:08:23 +02:00
Dirk Zigelmeier
3f4d75c8d6
netif_get_ip6_addr_match/netif_add_ip6_address must take a const ip6addr to be usable
2015-09-30 20:55:08 +02:00
Dirk Ziegelmeier
7962b21c00
snmp: fixed ugly inheritance implementation by aggregating the "base class" (struct mib_node) in all derived node classes to get more type-safe code
2015-09-30 17:54:25 +02:00
goldsimon
59002d5081
mib2: only export 'internet', all other variables can be static
2015-09-30 17:42:19 +02:00
goldsimon
ce883d2041
minor: mib2.c: sys_tem_* -> system_* for everything but 'sys_tem' (without suffix)
2015-09-30 17:39:32 +02:00
goldsimon
96847c1199
snmp: added helper functions to encode/decode BITS pseudo type, added define for Counter64 type, minor layout changes
2015-09-30 17:24:53 +02:00
goldsimon
df1f12778f
snmp: moved noleafs_get/set functions from mib2.c to mib_structs.c, where they belong
2015-09-30 17:19:08 +02:00
goldsimon
dff234112b
minor: removed superfluous comma after '}' in mib2.c; removed superfluous comment on get-functions that follow a function typedef
2015-09-30 17:13:05 +02:00
goldsimon
e18e08ff08
minor: removed superfluous comma after '}' in msg_out.c
2015-09-30 17:09:04 +02:00
goldsimon
f3ed562983
minor: removed superfluous comma after '}' in dns.c
2015-09-30 17:01:57 +02:00
goldsimon
969fb4c981
minor: removed some trailing spaces in tcp.c
2015-09-30 17:00:57 +02:00
Erik Ekman
82fcc307ef
mld6: Simplify join/leavegroup()
...
Use netif_get_ip6_addr_match() helper to shorten the code.
2015-09-30 16:35:15 +02:00
goldsimon
1fdab5ac0e
Added/changed header of dhcp.c/.h
2015-09-30 16:33:48 +02:00
goldsimon
389831218e
Finished task #13731 : fix usage of "snmp_inc_*"
2015-09-30 15:54:43 +02:00
goldsimon
7b5ef3ae58
implement/remove missing IP counters in stats_mib2 (see task #13731 )
2015-09-30 15:05:52 +02:00
goldsimon
9d28549f32
minor: fixed coding style in mld6.c
2015-09-30 14:48:25 +02:00
Erik Ekman
6cdea62638
Add functions to join/leave v6 multicast group by netif
...
Existing functions are based on IP address, but the address is used
only to look up which netif to act on. The netif-based core code is
extracted to new exported functions.
If you have a netif handle, this makes it easier to join/leave
groups, without the need to convert to IP address first only for the
mld6 code to convert back to netif.
2015-09-30 14:44:45 +02:00
goldsimon
3dd0977635
minor: fixed coding style in igmp.c
2015-09-30 14:37:37 +02:00
Erik Ekman
ba71ac78d9
Add functions to join/leave IGMP group by netif
...
Existing functions are based on IP address, but the address is used
only to look up which netif to act on. The netif-based core code is
extracted to new exported functions.
If you have a netif handle, this makes it easier to join/leave
groups, without the need to convert to IP address first only for the
IGMP code to convert back to netif.
2015-09-30 14:29:37 +02:00
goldsimon
373714c02f
dns: improved handling 2nd server if first failed
2015-09-30 14:22:39 +02:00
goldsimon
927b72abd2
fixed bug #46072 : ip4addr_aton() does not check the number range of all address parts
2015-09-30 14:15:36 +02:00
goldsimon
f89e859415
minor: fixed coding style in ip4addr_aton()
2015-09-30 14:13:05 +02:00
goldsimon
dae73e21b8
minor: fixed coding style in ip4addr_aton()
2015-09-30 14:11:50 +02:00
goldsimon
f950bf4362
ipaddr_aton(): favour ':' over '.' to decide for IPv6 first (since IPv6 mapped IPv4 addresses might contain both ':' and '.')
2015-09-30 14:06:44 +02:00
goldsimon
0621e8d1b1
ip6addr_aton(): fail on three successive colons in an IPv6 address string
2015-09-30 14:05:13 +02:00
goldsimon
5a185a0fbd
minor: fixed coding style in ip6addr_aton()
2015-09-30 13:55:09 +02:00
goldsimon
45fd622491
Fixed bug #46071 Logic error in line 1473 in dns.c
2015-09-30 13:36:13 +02:00
goldsimon
94625a8fa8
MIB2_STATS: moved netif related mib2 counters into a struct (defined in stats.h), added ifInErrors/ifInUnkownProtos (now handled in etharp.c) and ifOutErrors
2015-09-28 08:50:21 +02:00
goldsimon
bc30899168
fixed compiler warnings where passing variable instance to ip_addr_isany
2015-09-28 07:56:52 +02:00
sg
bb91bd2279
fixed coding style: use more ()
2015-09-24 21:04:20 +02:00
Sylvain Rochet
8b2c73de4e
ip4: routing: check peer for point to point interfaces
...
gw netif field for point to point interfaces is the peer IP address.
Check if the destination is equals to the gw field of point to point
interfaces (broadcast flag is not set) when routing an IP packet.
2015-09-24 21:01:52 +02:00
goldsimon
b0917d987a
Cleaned up using struct netif.ip_addr by creating API functions for it
2015-09-24 14:57:16 +02:00
goldsimon
99d2e5233d
struct udp_pcb.multicast_ip must be an ip_addr_t, too, to completely avoid temporary storage
2015-09-24 14:55:55 +02:00
goldsimon
c71723101a
Removed ip_2_ip4/6_c const macros again now that ip_2_ip4/6 macros keep the original const'ness
2015-09-24 14:38:52 +02:00
goldsimon
262a641396
eliminate temporary storage when using netif addresses for ip_addr_t* now that they have the correct type (ATTENTION: ip6_select_source_address() and ip4_netif_get_local_ip() now return ip_addr_t*!)
2015-09-24 14:34:24 +02:00
goldsimon
4d2f4ce78c
udp: don't use ip4_2_ip() where not required
2015-09-24 10:39:13 +02:00
goldsimon
ed4130bd2f
Fixed const errors after changing netif_ip4_addr/netif_ip6_addr to return cont pointers
2015-09-24 08:06:50 +02:00
goldsimon
0fbdd5e56e
fixed compiling LWIP_HAVE_LOOPIF after changing struct netif.ip6_addr to ip_addr_t
2015-09-24 07:58:29 +02:00
sg
db76671d4d
task #13729 : Convert netif addresses (IPv4 & IPv6) to ip_addr_t (so they can be used without conversion/temporary storage)
2015-09-23 22:09:37 +02:00
sg
f36adac8ab
fixed compiling udp.c for IPv6-only
2015-09-23 22:07:14 +02:00
sg
121268d320
Added ip_addr_set_zero_ip4() to explicitly set the type to IPv4 for dual-stack
2015-09-23 21:56:34 +02:00
goldsimon
e6b6543c33
igmp: use netif_ip4_addr() instead of directly accessing struct netif member
2015-09-23 16:26:56 +02:00
Dirk Ziegelmeier
e00e4a6c13
make netif_ip4_* get accessors return const pointers
2015-09-23 13:19:56 +02:00
sg
0454950564
fixed compiling for various config combinations
2015-09-17 22:19:37 +02:00
sg
4f9bcc5ecc
fixed compiler warnings reported by mingw-64
2015-09-17 22:00:16 +02:00
sg
39e32ea7c1
fixed const warning for !IPV6_FRAG_COPYHEADER
2015-09-17 21:59:54 +02:00
sg
6f0dceee09
fixed some printf formatters (mainly for window scaling code)
2015-09-17 21:33:25 +02:00
sg
9614c60cf6
fixed constness for DNS_LOCAL_HOSTLIST_IS_DYNAMIC
2015-09-17 21:32:11 +02:00
Robert Szewczyk
52a4ca99a8
pbuf_take: make it comply with API specifications
...
LWIP_ERROR macro exited the function early with the return code
indicating a SUCCESS. Fix the error codes. Return the specified
error code for cases when the pbuf is too short.
2015-09-17 17:05:01 +02:00
Joel Cunningham
72b3f3f612
Hook up TCP cachehit stat
...
This commit hooks up the TCP cachehit stat to the PCB locality feature
so that when a PCB is moved to the head of the list and a segment comes
in, we consider this a cache hit
This also matches the usage of the cachehit stat in UDP
2015-09-17 17:02:39 +02:00
Dirk Ziegelmeier
f62022cdf3
Compiler warning fixes (mostly constness in dual-stack configurations)
2015-09-17 13:59:52 +02:00
goldsimon
726af89168
minor compiler warning fixes and coding style
2015-09-17 11:00:21 +02:00
sg
68a1ec2eb1
Fixed passing ip_input() to netif_add() for single-IP-version NO_SYS configurations
2015-09-16 22:09:54 +02:00
Joel Cunningham
7276f49f54
Fix typos from task #12243
...
This fixes two typos spotted during visual inspection of changes related
to task #12243
2015-09-14 20:43:21 +02:00
Sylvain Rochet
4704c9a0ad
tcp: fixed CHECKSUM_GEN_TCP feature (misplaced #define)
2015-09-14 14:48:35 +02:00
goldsimon
7702ed66a0
fixed compiler warning (stray 'a ' in code) - why is this a warning only???
2015-09-08 09:52:22 +02:00
goldsimon
8a0fb03e21
Separate mib2 counter/table callbacks from snmp agent. This both cleans up the code and should allow integration of a 3rd party agent/mib2.
2015-09-08 09:47:30 +02:00
sg
1e4f312352
fixed compiling DNS code again
2015-09-08 06:03:27 +02:00
sg
77270adb96
Changed dns_gethostbyname_addrtype() to always be a function, fixed code for C PP :-(
2015-09-07 22:33:10 +02:00
sg
42170e4e57
fixed unused variable warning
2015-09-06 14:28:41 +02:00
Sylvain Rochet
318ba1decd
dns: fixed trivial compiler warning
...
lwip/src/core/dns.c:1471:8: warning: extra tokens at end of #endif directive [-Wendif-labels]
#endif LWIP_IPV4 && LWIP_IPV6
2015-09-06 11:27:33 +02:00
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
Ivan Delamer
8451feaa7a
fixed bug #42885 nd6_reachability_hint() accepts an address of an
...
unknown neighbour
2015-03-18 12:22:49 -06:00
Ivan Delamer
12e3b52f4d
fixed bug #39226 : Validity of netif IPv6 address is not always checked
2015-03-18 11:56:48 -06:00
Ivan Delamer
291f1382c5
fix ip6 part of bug #43904 : ip_route() and ip6_route() must detect
...
linkup status.
2015-03-18 10:56:02 -06:00
sg
905f1609b3
fixed the IPv4 part of bug #43904 (ip_route() must detect linkup status)
2015-03-09 21:35:57 +01:00
Sylvain Rochet
dbf9d0f094
DNS, warning fix, dns_init() -> dns_init(void)
...
lwip/src/core/dns.c: In function ‘dns_init’:
lwip/src/core/dns.c:336:1: warning: old-style function definition [-Wold-style-definition]
dns_init()
2015-03-07 23:28:18 +01:00
sg
12d374d4b7
Added function documentation, fixed coding style
2015-03-06 21:38:57 +01:00
sg
0ddd7de1ba
patch #8359 (Provide utility function to add an IPv6 address to an interface)
2015-03-06 21:30:59 +01:00
sg
f385193a89
Patch #8207 (Don't Use ND6 Prefix Flags Field When LWIP_IPV6_AUTOCONFIG Is Deasserted)
2015-03-06 21:03:21 +01:00
Philip Gladstone
ff078920bc
Patch #8360 (Speed up the acquisition of SLAAC addresses) - adapted to bug #43784
2015-03-06 20:58:30 +01:00
sg
553c4203ab
tcp/udp_netif_ipv4_addr_changed(): don't change specific-address of local tcp_listen/udp_pcb to ANY on address change
2015-03-06 20:25:51 +01:00
sg
4e520cdd30
fixed bug #37068 (netif up/down handling is unclear): correclty separated administrative status of a netif (up/down) from 'valid address' status ATTENTION: netif_set_up() now always has to be called, even when dhcp/autoip is used!
2015-03-05 20:57:43 +01:00
sg
72dcdb7655
fixed bug #43784 (a host should send at least one Router Solicitation)
2015-03-04 21:21:49 +01:00
sg
db5510b866
init.c: raise an error if LWIP_PPP_API==1 but PPP_SUPPORT==0
2015-03-04 21:10:29 +01:00
sg
61e0efa0c7
fixed bug #41094 (Byte-order bug in IPv6 fragmentation header test)
2015-03-04 21:02:52 +01:00
sg
12514c09b2
Fixed bug #39956 (netif_create_ip6_linklocal_address out of bounds access of netif::hwaddr)
2015-03-04 20:58:37 +01:00
sg
90a0590de1
patch by Zach Smith: fixed bug #38153 (nd6_input() byte order issues)
2015-03-04 20:49:02 +01:00
Sylvain Rochet
a310bc19a7
netif: fixed compiler warning
...
lwip/src/core/netif.c: In function ‘netif_set_ipaddr’:
lwip/src/core/netif.c:403:5: warning: implicit declaration of function ‘udp_netif_ipv4_addr_changed’ [-Wimplicit-function-declaration]
udp_netif_ipv4_addr_changed(&netif->ip_addr, ipaddr);
^
2015-02-26 22:45:37 +01:00
sg
0647533f8c
fixed bug #44378 (TCP connections are not aborted on netif remove)
2015-02-26 22:25:39 +01:00
sg
99dd78964a
fixed bug #40753 (re-bind UDP pcbs on change of IP address)
2015-02-26 22:17:30 +01:00
sg
0d1606ff23
Fixed last commit: can only check for bound sockets, not for unbound. There's some work to do for IPv6 in TCP...
2015-02-26 21:31:48 +01:00
sg
a6a92d42f9
Fixed bug #41700 (Call to tcp_listen_dual() should not accept IPv4 listen PCB args)
2015-02-26 21:23:40 +01:00
sg
5984c996a8
fixed bug #40177 (System hangs when dealing with corrupted packets), implemented task #12357 (Ensure that malicious packets don't assert-fail): improved some pbuf_header calls to not assert-fail.
2015-02-25 22:58:27 +01:00
Joel Cunningham
9004554da3
fixed bug #43028 (IP_MULTICAST_TTL affects unicast datagrams)
2015-02-25 21:59:21 +01:00
Greg Renda
4eb9efdd33
fixed bug #38210 (ip reassembly while remove oldest datagram)
2015-02-25 21:43:39 +01:00
sg
612e33c499
fixed bug #38061 (wrong multicast routing in IPv4) by adding an optional default netif for multicast routing
2015-02-25 20:58:11 +01:00
Sylvain Rochet
b4990b5bb4
Fixed warnings on whole project introduced by const pointers on ip_addr_t
2015-02-22 22:50:06 +01:00
sg
c87efb77bc
patch by Jens Nielsen: fixed bug #38803 (Source address in broadcast ping reply)
2015-02-22 22:02:17 +01:00
sg
ec5cf8593e
Continued chrysn's work: changed nearly all functions taking 'ip(X)_addr_t' pointer to take const pointers (changed user callbacks: raw_recv_fn, udp_recv_fn; changed port callbacks: netif_output_fn, netif_igmp_mac_filter_fn)
2015-02-22 21:46:35 +01:00
chrysn
9f065c0ea5
(api break) qualify ip_addr_t as const where feasible
...
this changes the callback signatures of the ip_output and the
{udp,raw}_recv functions.
changes were made by going through all header files, searching for
occurrences of ip_addr_t, qualifying them as const and if required
modifying the corresponding c files, looking for other uses of ip_addr_t
that would be required.
the following header files were not treated as i'm not using them and
wouldn't see them compiled: api.h api_msg.h dhcp.h dns.h igmp.h
netifapi.h pppapi.h snmp.h snmp_msg.h snmp_structs.h ppp.h pppol2tp.h
test/*
no modifications were done on ip6_addr_t.
2015-02-22 21:46:02 +01:00
Sylvain Rochet
1e82003bf9
CORE, INIT, fail if none of PPP_IPV[46]_SUPPORT are enabled if PPP_SUPPORT is enabled
...
PPP_SUPPORT needs PPP_IPV4_SUPPORT and/or PPP_IPV6_SUPPORT turned on.
2015-02-22 14:30:24 +01:00
Sylvain Rochet
2e40ceaaa4
CORE, enabling only PPPoL2TP is also a valid choice
2015-02-20 00:40:44 +01:00
Ivan Delamer
b938154f6b
Removed unused netif flag for DHCP
2015-02-19 16:22:19 -07:00
sg
101f57d5e0
tcp_alloc() prefers killing CLOSING/LAST_ACK over active connections (see bug #39565 ) (tcp_kill_prio(): back to old implementation)
2015-02-18 21:30:45 +01:00
goldsimon
9048a7f021
fixed compiler warning in dhcp.c
2015-02-18 09:02:37 +01:00
Sylvain Rochet
ea205f2fcd
PPP, add PPPoS CB for PPPoS private data
...
Created a new PPPoS CB going to have PPPoS private data, so allocating a
PPPoE or a PPPoL2TP interface does not allocate as well PPPoS variables.
2015-02-17 23:22:13 +01:00
goldsimon
5d13b5a2fb
fixed bug #37614 "Errors from ipX_output are not processed". Now tcp_output(_segment) checks for the return value of ipX_output and does not try to send more on error. A netif driver can call tcp_txnow() (from tcpip_thread!) to try to send again if TX buffers are available again.
2015-02-17 08:02:34 +01:00
sg
90db821036
patch #8361 "Add support for NTP option in DHCP" (slighly modified)
2015-02-16 21:23:06 +01:00
sg
0d18516af8
added support for write-access community and dedicated community for sending traps
2015-02-14 15:44:32 +01:00
sg
e22c815444
patch by Freddie Chopin: SNMP: const-correctness around snmp traps and enterprise
2015-02-14 15:11:44 +01:00
sg
e579e98469
minor coding style fix: tab -> spaces
2015-02-14 15:05:12 +01:00
Freddie Chopin
4ebeeaf1e0
msg_in.c, msg_in.c: add snmp_get_community() and snmp_set_community() accessors
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:49:42 +01:00
Freddie Chopin
2c9ceea3cf
msg_in.c, snmp_msg.h: convert snmp_community to a modifiable pointer
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:49:41 +01:00
Freddie Chopin
c289872ab7
msg_in.c, msg_out.c, snmp_msg.h: rename snmp_publiccommunity to snmp_community, update descriptions
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:49:39 +01:00
Freddie Chopin
9469bdc93e
msg_in.c, snmp_msg.h: don't hardcode size of community string
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:47:55 +01:00
Freddie Chopin
9b4564d7f3
snmp_trap_header_sum(): use strlen() to get the length of community string
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:46:51 +01:00
sg
b5b5844119
added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when a memp pool was empty and an item is now available
2015-02-13 21:53:55 +01:00
sg
6ef7563f53
Added the option PBUF_LINK_ENCAPSULATION_HLEN to allocate additional header space for TX on netifs requiring additional headers
2015-02-13 21:42:04 +01:00
sg
e3e3200f95
fixed bug #22070 "MIB_OBJECT_WRITE_ONLY not implemented in SNMP"
2015-02-13 21:12:23 +01:00
sg
7a0f814043
introduce sys_timeouts_sleeptime (returns the time left before the next timeout is due, for NO_SYS==1)
2015-02-12 22:14:28 +01:00
sg
80b62df0a9
fixed bug #36403 "ip4_input() and ip6_input() always pass inp to higher layers": now the accepting netif is passed up, but the input netif is available through ip_current_input_netif() if required.
2015-02-12 22:04:10 +01:00
sg
f7905582db
More tiny code cleanups...
2015-02-11 21:53:12 +01:00
Fred Baksik
f12e6837be
LWIP_PLATFORM_DIAG: check if LWIP_PLATFORM_DIAG is defined as needed.
...
-- LWIP_STATS and LWIP_DEBUG require this macro
2015-02-11 21:44:43 +01:00
sg
974a853f40
patch #8423 "arch/perf.h" should be made an optional item
2015-02-11 21:25:47 +01:00
goldsimon
338feef70e
memp: also export memp_sizes[] if MEMP_USE_CUSTOM_POOLS==1
2015-02-10 15:18:14 +01:00
goldsimon
e926a93568
tcp_kill_prio(): prefer nearly-closed connections (waiting for the last ACK only) over established connections when out of tcp pcbs
2015-01-20 12:45:26 +01:00
sg
28476e3b7b
Fixed bug #38315 tcp_eff_send_mss_impl() always subtract the difference in IPv6 header size
2015-01-18 14:08:11 +01:00
sg
c1804810d8
allow enabling socket API without (public) netconn API - netconn API is still used by sockets, but keeping it private (static) should allow better compiler optimizations
2015-01-17 14:42:50 +01:00
sg
69ee35c909
tcp_close_shutdown: remove invalid comment on linger: we cannot support linger for the raw API since linger implies blocking
2015-01-17 14:36:39 +01:00
goldsimon
1cbd2121e2
Allow to overrid the check for p->ref==1 in TX packets (there *are* netif drivers that can handle this)
2015-01-16 17:58:07 +01:00
goldsimon
c0d9e3231b
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2015-01-16 17:38:20 +01:00
goldsimon
2775fb5a45
fixed bug #20506 "Initial congestion window is very small" again by implementing the calculation formula from RFC3390
2015-01-16 17:38:07 +01:00
Sylvain Rochet
6ca8bc4037
inet_checksum: fixed prototype of lwip_standard_chksum() when LWIP_CHKSUM_ALGORITHM == 1
2015-01-10 13:59:55 +01:00
Sylvain Rochet
b30faa577d
PPP, moved ppp_init() from public API (ppp.h) to private API (ppp_impl.h)
...
ppp_init() is called by lwip_init(), users don't need to init PPP by themselves
2014-12-24 19:08:58 +01:00
Sylvain Rochet
382ddac1a1
CORE: fixed missing prototype for pbuf_header_impl() function
...
lwip/src/core/pbuf.c:502:1: warning: no previous prototype for ‘pbuf_header_impl’ [-Wmissing-prototypes]
2014-12-24 15:18:21 +01:00
goldsimon
32c6f96000
prevent dhcp from starting when netif link is down (only when LWIP_DHCP_CHECK_LINK_UP==1, which is disabled by default for compatibility reasons)
2014-12-19 16:04:48 +01:00
goldsimon
5d74d97fe1
TCP_OVERSIZE: make segment size allocated by TCP_OVERSIZE overridable for tests
2014-12-17 09:32:08 +01:00
goldsimon
db4844e3f0
fixed bug #43840 Checksum error for TCP_CHECKSUM_ON_COPY==1 for no-copy data with odd length
2014-12-17 09:26:17 +01:00
sg
7ca4fd817e
- fixed bug #43797 set/getsockopt: SO_SNDTIMEO/SO_RCVTIMEO take int as option but should take timeval (LWIP_SO_SNDRCVTIMEO_STANDARD==0 can be used to revert to the old 'winsock' style behaviour);
...
- Fixed implementation of SO_ACCEPTCONN to just look at the pcb state;
- cleaned up the SO/SOF defines (only 3 left a ip_pcb level);
2014-12-10 21:46:49 +01:00
goldsimon
35729f0870
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2014-12-10 09:49:12 +01:00
goldsimon
0ff98eb2f5
mem: added an MEMP_OVERFLOW_CHECK implementation for MEM_USE_POOLS; added another unit test
2014-12-10 09:48:50 +01:00
sg
f38352f1af
fixed bug #43596 IGMP queries from 0.0.0.0 are discarded
2014-12-09 20:56:39 +01:00
goldsimon
4085a3fad4
task #11472 Support PBUF_REF for RX (IPv6 and IPv4/v6 reassembly might not work yet)
2014-12-08 14:45:36 +01:00
goldsimon
ec93b03d8d
Fixed multiple smaller compiler warnings
2014-11-07 14:29:53 +01:00
goldsimon
2809405164
lwip_socket_init() is not needed any more -> compatibility define
2014-11-06 14:14:58 +01:00
goldsimon
79ecf2edb7
SNMP: added missing casts to int for printf arguments
2014-11-03 09:23:50 +01:00
goldsimon
b8d798158b
fixed bug #43389 dns_recv() res_idx calculate error
2014-10-09 10:13:50 +02:00
Simon Goldschmidt
33237419c1
Parts of patch #8397 Typos corrected in comments and text outputs
2014-09-18 21:15:13 +02:00
Simon Goldschmidt
aa6f6bc3aa
patch #8480 Fix handling of dns_seqno wraparound
2014-09-17 22:52:58 +02:00
Simon Goldschmidt
f1e023af85
init.c: LWIP_PPP_API needs NO_SYS==0
2014-09-17 21:30:41 +02:00
Simon Goldschmidt
085c1594de
fixed bug #43192 tcp_enqueue_flags() should not check TCP_SND_QUEUELEN when sending FIN
2014-09-16 20:18:25 +02:00
Simon Goldschmidt
56c6301089
dns.c: change dns_send/dns_recv to operate on pbuf, not on contiguous buffer -> dns_payload_buffer/DNS_MSG_SIZE can be removed
2014-09-16 19:33:20 +02:00
Simon Goldschmidt
e303f30d10
added pbuf_take_at() and pbuf_put_at() (in preparation for dns.c changes)
2014-09-16 19:22:46 +02:00
Simon Goldschmidt
9fb46e1206
added source port randomization to make the DNS client more robust (see bug #43144 )
2014-09-15 21:50:41 +02:00
Simon Goldschmidt
8216303524
revert accidentally committed test code
2014-09-05 21:17:20 +02:00
Simon Goldschmidt
6c7357bbf9
DNS: minor coding style fix: pEntry -> entry
2014-09-05 21:15:50 +02:00
Simon Goldschmidt
13add693db
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2014-09-05 21:13:03 +02:00
Simon Goldschmidt
a491aa0f6a
DNS: split request callback information from actual DNS table to be able to optimize memory usage for multiple parallel requests (and clean up the code a bit)
2014-09-05 21:11:57 +02:00
goldsimon
e8f49f1b95
update CHANGELOG and fix coding style (fixed bug #39355 SNMP Memory Leak in case of error)
2014-09-03 08:10:07 +02:00
Fatih Aşıcı
0a8c53575c
snmp: Fix a memory leak
...
Check the value of vbi->ident before replacing it with vbo->ident.
2014-09-03 08:01:25 +02:00
Simon Goldschmidt
1fd4b851f5
Moved #define NETDB_ELEM_SIZE from dns.h to netdb.h, where it belongs, and use sizeof() instead of hacked constants that are wrong on 64-bit platforms
2014-09-02 21:27:24 +02:00
Simon Goldschmidt
142cc8fe2a
minor: fixed a comment typo only
2014-09-02 21:26:35 +02:00
Simon Goldschmidt
39caf630a9
fixed bug #42299 tcp_abort() leaves freed pcb on tcp_bound_pcbs list
2014-09-02 20:59:00 +02:00
goldsimon
b0502d1f3b
added optional macros PACK_STRUCT_FLD_8() and PACK_STRUCT_FLD_S() to prevent gcc 4 from warning about struct members that do not need packing
2014-09-02 13:04:36 +02:00
Simon Goldschmidt
a5e06ed5b7
fixed bug #42987 lwIP is vulnerable to DNS cache poisoning due to non-randomized TXIDs
2014-08-31 20:29:56 +02:00
Simon Goldschmidt
e7f3224091
again bug #26069 : Documentation of tcp_connect() incorrectly describes handling of errors
2014-06-04 20:54:02 +02:00
Simon Goldschmidt
974f6982a1
fixed bug #37969 SYN packet dropped as short packet in tcp_input function
2014-06-03 21:07:49 +02:00
Sylvain Rochet
7fe7e1e984
Merge branch 'ppp-new'
...
Based from pppd 2.4.5, released 2009-11-17, with huge changes to match
code size and memory requirements for embedded devices, including:
- Gluing together the previous low-level PPP code in lwIP to pppd 2.4.5, which
is more or less what pppd sys-* files are, so that we get something working
using the unix port.
- Merged some patchs from lwIP Git repository which add interesting features
or fix bugs.
- Merged some patchs from Debian pppd package which add interesting features
or fix bugs.
- Ported PPP timeout handling to the lwIP timers system
- Disabled all the PPP code using filesystem access, replaced in necessary cases
to configuration variables.
- Disabled all the PPP code forking processes.
- Removed IPX support, lwIP does not support IPX.
- Ported and improved random module from the previous PPP port.
- Removed samba TDB (file-driven database) usage, because it needs a filesystem.
- MS-CHAP required a DES implementation, we added the latest PolarSSL DES
implementation which is under a BSD-ish license.
- Also switched to PolarSSL MD4,MD5,SHA1 implementations, which are meant to be
used in embedded devices with reduced memory footprint.
- Removed PPP configuration file parsing support.
- Added macro definition EAP_SUPPORT to make EAP support optional.
- Added macro definition CHAP_SUPPORT to make CHAP support optional.
- Added macro definition MSCHAP_SUPPORT to make MSCHAP support optional.
- Added macro definition PAP_SUPPORT to make PAP support optional.
- Cleared all Linux syscall calls.
- Disabled demand support using a macro, so that it can be ported later.
- Disabled ECP support using a macro, so that it can be ported later.
- Disabled CCP support using a macro, so that it can be ported later.
- Disabled CBCP support using a macro, so that it can be ported later.
- Disabled LQR support using a macro, so that it can be ported later.
- Print packet debug feature optional, through PRINTPKT_SUPPORT
- Removed POSIX signal usage.
- Fully ported PPPoS code from the previous port.
- Fully ported PPPoE code from the previous port.
- Fully ported VJ compression protocol code from the previous port.
- Removed all malloc()/free() use from PPP, replaced by stack usage or PBUF.
- Disabled PPP server support using a macro, so that it can be ported later.
- Switched all PPP debug to lwIP debug system.
- Created PPP Control Block (PPP PCB), removed PPP unit integer everywhere,
removed all global variables everywhere, did everything necessary for
the PPP stack to support more than one PPP session (pppd only support
one session per process).
- Removed the statically allocated output buffer, now using PBUF.
- Improved structure size of all PPP modules, deep analyze of code to reduce
variables size to the bare minimum. Switched all boolean type (char type in
most architecture) to compiler generated bitfields.
- Added PPP IPv6 support, glued lwIP IPv6 support to PPP.
- Now using a persistent netif interface which can then be used in lwIP
functions requiring a netif.
- Now initializing PPP in lwip_init() function.
- Reworked completely the PPP state machine, so that we don't end up in
anymore in inconsistent state, especially with PPPoE.
- Improved the way we handle PPP reconnection after disconnect, cleaning
everything required so that we start the PPP connection again from a
clean state.
- Added PPP holdoff support, allow the lwIP user to wait a little bit before
reconnecting, prevents connection flood, especially when using PPPoL2TP.
- Added PPPoL2TP LAC support (a.k.a. UDP tunnels), adding a VPN client
feature to lwIP, L2TP being a widely used tunnel protocol.
- Switched all used PPP types to lwIP types (u8t, u16t, u32t, ...)
- Added PPP API "sequential" thread-safe API, based from NETIFAPI.
2014-05-22 21:25:58 +02:00
Simon Goldschmidt
9148ab79f3
fixed bug #37184 tcp_write problem for pcbs in the SYN_SENT state
2014-05-20 22:12:36 +02:00
goldsimon
f1c7e73bef
fixed last commit (copy & paste from patch broke the code)
2014-05-20 12:22:13 +02:00
Simon Goldschmidt
c18abd4fbe
Fixed bug #41686 (ipv4 ip_reass() crash error) introduced some months ago while fixing bug #41041...
2014-05-19 22:07:57 +02:00
Simon Goldschmidt
c3ac875055
Fixed typo-bug introduced some months ago while fixing bug #41041...
2014-05-19 22:03:19 +02:00
Sylvain Rochet
33b42872e5
Merge branch 'master' into ppp-new
2014-05-08 14:25:30 +02:00
goldsimon
8bb7602145
SNMP: fix "uninitialized variable" warning
2014-05-06 09:42:41 +02:00
Sylvain Rochet
d9e2edd1df
Merge branch 'master' into ppp-new
2014-05-05 20:55:18 +02:00
Simon Goldschmidt
f9d80d5bd2
try to fix another warning from static code analysis
2014-04-30 22:11:49 +02:00
goldsimon
406874b6c2
snmp: added missing default cases (only used for trace output)
2014-04-30 13:50:18 +02:00
goldsimon
e4ddd6cb6d
Multiple fixes found by coverity scan
2014-04-30 12:22:31 +02:00
Sylvain Rochet
ca7769e041
Merge branch 'master' into ppp-new
2014-04-12 01:25:00 +02:00
Simon Goldschmidt
88a57dc98d
Fixed bug #36167 tcp server crash when client closes (maximum window)
2014-04-08 21:26:27 +02:00
Simon Goldschmidt
035ecef8a5
Fixed bug #36210 lwIP does not elicit an empty ACK when received unacceptable ACK
2014-04-06 22:40:51 +02:00
Simon Goldschmidt
4c3b6814dc
Fixed compiling broken ip6.c after last commit
2014-04-06 22:33:27 +02:00
Simon Goldschmidt
3f016fcc5a
Multiple small/minor issues: bug #36492 Static Analysis on code 1.4.0
2014-04-06 21:43:37 +02:00
Simon Goldschmidt
be75c483d0
Fixed bug #41787 DHCP Discovery is invalid when an IP is set to thet netif (send discover, request and decline from 'any').
...
Addd functions to send udp/ipv4/ipv6 packets with source address 'any' although netif has an address assigned
2014-04-06 20:32:37 +02:00
Sylvain Rochet
a38e5a44ec
Merge branch 'master' into ppp-new
2014-03-14 20:48:12 +01:00
Simon Goldschmidt
3fceef0936
- fixed bug #36153 TCP Cheksum error if LWIP_CHECKSUM_ON_COPY=1;
...
- don't fail on small mss or snd_wnd_max
2014-03-14 19:46:24 +01:00
Simon Goldschmidt
c82f04f54c
fixed bug #40303 DHCP xid renewed when sending a DHCPREQUEST
2014-02-27 22:44:16 +01:00
Simon Goldschmidt
d9d0c52770
fixed bug #41680 raw socket can not receive IPv6 packet when IP_SOF_BROADCAST_RECV==1
2014-02-27 22:18:45 +01:00
Simon Goldschmidt
f36d6b7ef5
fixed bug #39514 ip_route() may return an IPv6-only interface
2014-02-25 22:37:52 +01:00
Simon Goldschmidt
e9908048ec
fixed bug #39356 Wrong increment in pbuf_memfind()
2014-02-25 22:34:27 +01:00
Simon Goldschmidt
dceed2ea5c
fixed bug #39225 udp.c uses netif_matches_ip6_addr() incorrectly; renamed function netif_matches_ip6_addr() to netif_get_ip6_addr_match()
2014-02-25 22:30:46 +01:00
Simon Goldschmidt
7b63878926
Fixed bug #39224 Unused IPv6 address state defines in nd6
2014-02-25 22:26:02 +01:00
Simon Goldschmidt
01ecd3517e
fixed bug #39145 IGMP membership report for 224.0.0.1
...
-> ensure that we never send a report for 224.0.0.1
2014-02-25 22:21:31 +01:00
Sylvain Rochet
75ef1278e6
Merge branch 'master' into ppp-new
2014-02-21 20:37:10 +01:00
Simon Goldschmidt
4d69d0eda5
Fixed IPv6 raw checksumming after a hint from Philip Gladstone
2014-02-21 08:41:44 +01:00
Sylvain Rochet
d7ba4bbb9b
Merge branch 'master' into ppp-new
2014-02-21 00:39:29 +01:00
Simon Goldschmidt
2225b8add7
fixed bug #39683 Assertion "seg->tcphdr not aligned" failed with MEM_ALIGNMENT = 8
2014-02-20 22:35:37 +01:00
Simon Goldschmidt
c1dc1a20d6
fixed bug #40050 SNMP problem with MIB arrays > 255
2014-02-20 22:14:10 +01:00
Simon Goldschmidt
0f24fba28a
IGMP: fixed !define LWIP_RAND case
2014-02-20 22:07:58 +01:00
Freddie Chopin
08b56e8180
SNMP: mib-2.system.sysObjectID is read-only, so make the object "static const" and modify just the pointer; snmp_get_sysobjid_ptr() and snmp_set_sysobjid() take a pointer to "const" object now
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-02-20 21:24:23 +01:00
Freddie Chopin
7a77917df6
SNMP: use MEMCPY() instead of ocstrncpy() and objectidncpy()
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-02-20 21:24:21 +01:00
Simon Goldschmidt
a375ea4ee2
Minor: coding style cleanups...
2014-02-20 20:09:33 +01:00
Grant Erickson
d74464e091
Add RFC3542-style checksum compuation on raw, IPv6 sockets
...
This patch adds support for RFC3542-style checksum computation on raw,
IPv6 sockets via the IPV6_CHECKSUM socket option.
This allows the development of application-layer utilities such as
ping6 which are unable to compute the raw packet checksum without a
prior knowledge of the source address selection.
2014-02-20 20:01:37 +01:00
Simon Goldschmidt
e2c2afbbe0
patch #7885 : modification of api modules to support FreeRTOS-MPU (don't pass stack-pointers to other threads) (based on patch by Artem Pisarenko)
2014-02-20 19:50:17 +01:00
Simon Goldschmidt
2f02120fee
Fixed typo.
2014-02-20 15:43:51 +01:00
Simon Goldschmidt
c0b534e531
Minor fixes to init.c preprocessor checks
2014-02-12 22:20:25 +01:00
Erik Ekman
5eaef50a77
Remove newlines in LWIP_ERROR calls
2014-02-12 22:10:36 +01:00
Simon Goldschmidt
751deac9d1
Another fix to window scaling: support queueing more than 64 KByte in ooseq data
2014-02-12 21:34:19 +01:00
Sylvain Rochet
406da499ff
Merge branch 'master' into ppp-new
2014-02-09 16:40:43 +01:00
Simon Goldschmidt
6272b5c58c
Fixed misleading comment on sys_untimeout()
2014-02-07 14:03:53 +01:00
Simon Goldschmidt
8c9b99458d
Fixed forgotten brackets in last commit
2014-02-07 12:11:36 +01:00
Simon Goldschmidt
3273c68b63
Added comments to clarify the LWIP_TCP_TIMESTAMPS option.
2014-02-07 11:46:23 +01:00
Simon Goldschmidt
a44e2190d6
TCP window scaling: change tcp_pcb::acked to u32_t when window scaling is enabled to prevent an overflow when more than 64 Kbytes are ACKed
2014-02-07 11:32:02 +01:00
Simon Goldschmidt
2dab478c3f
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
...
Conflicts:
src/core/tcp_out.c
src/include/ipv4/lwip/ip4_addr.h
2014-02-07 09:40:10 +01:00
Simon Goldschmidt
d2a89b424b
patch #6537/#7858: TCP window scaling support (OOS queueing still needs special handling)
2014-02-06 22:34:06 +01:00
Sylvain Rochet
9502cd7047
Merge branch 'master' into ppp-new
2014-01-19 14:32:14 +01:00
Sylvain Rochet
cd02450095
recently applied patches changed LF-terminated filed to mostly LF and CR+LF only where the patches changed lines
2014-01-19 14:28:17 +01:00
Sylvain Rochet
03a3412e62
Merge branch 'master' into ppp-new
2014-01-19 03:41:01 +01:00
Simon Goldschmidt
a70567e74f
patch #8009 by chrysn: stats_display_igmp used by ml6d
2014-01-18 22:16:09 +01:00
Simon Goldschmidt
32b1a9fc8a
patch #8237 by Brian Fahs: tcp_rexmit_rto fails to update pcb->unsent_oversize when necessary
2014-01-18 21:40:17 +01:00
Simon Goldschmidt
018719d9d3
patch #8027 : Completed HW checksuming for IPv4 and IPv6 ICMP's
2014-01-17 22:32:36 +01:00
Simon Goldschmidt
5070cc07be
Fixed LWIP_IPV6==0
2014-01-17 21:57:40 +01:00
Simon Goldschmidt
1e65eb4936
Added IPv6 loopback address to loopback-netif, fixed last commit
2014-01-17 21:55:46 +01:00
Jay Logue
13e40f754c
Enable support for IPv6 loopback
...
Packets are sent through the loopback path when they are addressed to any
of the valid local IPv6 addresses.
2014-01-17 21:32:24 +01:00
Sylvain Rochet
87cfd930e4
Merge branch 'master' into ppp-new
2014-01-17 00:48:55 +01:00
Stathis Voukelatos
039737ffc2
Fixed netif_poll() operation when LWIP_LOOPBACK_MAX_PBUFS > 0.
...
Using the pbuf_clen() function to calculate the number of pbufs
for the first packet in the queue is not correct here, as pbuf_clen()
will return the total number of pbufs in the loopback I/F queue.
2014-01-16 21:36:49 +01:00
Freddie Chopin
4e1320d480
SNMP: mib-2.system.sysDescr is read-only, so add const qualifiers to functions and pointers
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-01-14 21:51:39 +01:00
Freddie Chopin
e6202cfa97
SNMP: source of ocstrncpy() and objectidncpy() may be const
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-01-14 21:51:29 +01:00
Simon Goldschmidt
a15b28a24e
SNMP: fixed typo: snmp_set_sysdesr -> snmp_set_sysdescr
2014-01-14 21:49:33 +01:00
Simon Goldschmidt
9975dbeded
Fixed chrysn's patch: it only works for NO_SYS :-(
2014-01-14 21:48:58 +01:00
chrysn
252abbeb8d
make timeouts usable reliably from outside of the timeout routine
...
although timeouts are relative to timeouts_last_time (transitively by
addition to the time values of their predecessors, if there are any),
sys_timeout does not compensate for that; as a result, timeouts fire too
early unless invoked from within a timeout handler (when
timeouts_last_time == now).
2014-01-14 21:25:03 +01:00
Sylvain Rochet
bf37afd7c7
Merge branch 'master' into ppp-new
2014-01-12 15:05:37 +01:00
Simon Goldschmidt
f311045320
Added an assert that should trigger bug #41009 (IPv6 reassembly broken on 64-bit platforms)
2014-01-10 22:08:01 +01:00
Simon Goldschmidt
381a7b110a
fixed bug #41041 Potential use-after-free in IPv6 reassembly
2014-01-10 21:47:42 +01:00
Simon Goldschmidt
75f2c56558
bug #41188 Alignment error in memp_init() when MEMP_SEPARATE_POOLS==1
2014-01-10 21:26:28 +01:00
Simon Goldschmidt
91333c5d2f
fixed bug #39898 tcp_fasttmr() possible lock due to infinte queue process loop
2014-01-10 21:21:54 +01:00
Sylvain Rochet
ee2ba4e52f
Merge branch 'master' into ppp-new
2013-07-20 21:04:49 +02:00
Simon Goldschmidt
2fb5a71efd
patch #8030 : fixed spelling of "received"
2013-06-19 22:23:05 +02:00
Sylvain Rochet
434daf87c2
Merge branch 'master' into ppp-new
2013-04-26 19:54:01 +02:00
Sylvain Rochet
c681e5e082
reverted dhcp.c from DOS (CRLF) to UNIX (LF) format
2013-04-26 19:52:42 +02:00
Sylvain Rochet
3fe5a99dab
Merge branch 'master' into ppp-new
2013-04-25 00:36:12 +02:00
Simon Goldschmidt
252126cf76
fixed possible division by zero
2013-04-24 22:20:12 +02:00
Simon Goldschmidt
8609d1e790
fixed bug #38526 Coverity: Recursive Header Inclusion in ip6.h
2013-04-24 21:58:57 +02:00
Simon Goldschmidt
9809f1ff66
Fixed bug #38586
2013-04-24 21:38:01 +02:00
Simon Goldschmidt
796098e4c9
fixed bug #38701 (wrong comment on tcp_pcb::snd_queuelen
2013-04-24 21:28:56 +02:00
Sylvain Rochet
69b15c889d
Merge branch 'master' into ppp-new
2013-01-20 02:57:57 +01:00
Simon Goldschmidt
ff3bf6d7f5
fixed bug #37665 ip_canforward operates on address in wrong byte order
2013-01-15 21:10:32 +01:00
Simon Goldschmidt
86059bd5dd
fixed more unused variables
2013-01-14 21:06:13 +01:00
Simon Goldschmidt
9927d991ef
Fixed bug #37893 Unused variables in tcp_out (and in udp.c/.h)
2013-01-14 20:46:41 +01:00
Simon Goldschmidt
6849b7d555
Added additional sanity check that all headers (without IP- or TCP options) fit into the first pbuf.
2013-01-14 18:05:18 +01:00
Simon Goldschmidt
1efd1ee6ac
fixed bug #37705 Possible memory corruption in DNS query
2013-01-14 18:04:04 +01:00
Simon Goldschmidt
d12600fba0
fixed bug #37705 Possible memory corruption in DNS query
2013-01-14 18:03:23 +01:00
Simon Goldschmidt
769b2a3e30
fixed bug #38066 Raw pcbs can alter packet without eating it: added assertion to check that p->payload is unchanged
2013-01-11 21:59:26 +01:00
Simon Goldschmidt
d237ec7e78
Changed C++ comments to C style
2013-01-11 21:27:45 +01:00
Sylvain Rochet
6bd0bd2ed1
Merge branch 'master' into ppp-new
2012-12-23 22:56:51 +01:00
Ivan Delamer
3bb29bf63a
Fix bug #37959 : ip6_debug_print prints plen, nexth, hoplim in wrong
...
byte order
2012-12-19 16:38:44 -07:00
Sylvain Rochet
78d52ad2de
Merge branch 'master' into ppp-new
2012-12-19 14:05:59 +01:00
"Grant Erickson"
4fe648415f
Fixed typo in debug formatting in ip6.c
2012-12-14 16:08:24 -07:00
Sylvain Rochet
7fb874ad28
Merge branch 'master' into ppp-new
2012-09-27 21:32:27 +02:00
goldsimon
99aea7eb6f
Added brackets, completed CHANGELOG
2012-09-26 21:30:01 +02:00
Henrik Persson
b4ac36337f
Fix corner case with dhcp timeouts
...
If t1 >= t2 timeout then only t2 timer should be scheduled. This can happen
when a sub 1 minute lease is received.
2012-09-26 21:25:04 +02:00
goldsimon
7072bc3203
Added brackets, completed CHANGELOG
2012-09-26 21:21:26 +02:00
Henrik Persson
7e9f000d0b
Segfault in dhcp_parse_reply if no end marker
...
If no endmarker is present in a dhcp reply a null pointer is potentially
dereferenced.
Add fix and test case as proof of concept.
2012-09-19 22:11:56 +02:00
Sylvain Rochet
4928166593
Merge branch 'master' into ppp-new
2012-08-23 20:51:53 +02:00
goldsimon
150b4fb4f6
fixed bug #37166 : memp_sanity check loops itself
2012-08-22 21:59:02 +02:00