Dirk Ziegelmeier
7037b340c1
Move etharp to core/ipv4, which is a more appropriate place for it
2016-07-19 09:29:51 +02:00
Dirk Ziegelmeier
06c7404461
Fix bug #48510 , DHCP requires ARP
...
Use solution 2 proposed by Jens Nielsen
2016-07-19 09:10:21 +02:00
Dirk Ziegelmeier
b91e47b518
Implement portable and overridable allocation of memory buffers
...
Fixes bug #48300 (Private mempools allocate foreign memory), bug #48354 (Portable alignment defines/include required for static allocation) and bug #47092 (Tag memory buffers like memp_memory_xxx and ram_heap with a macro so that attributes can be attached to their definitions)
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2016-07-07 13:35:13 +02:00
goldsimon
14ca418ac0
minor: coding style fixes
2016-07-05 07:36:51 +02:00
Dirk Ziegelmeier
38c0255fa2
Fix a few more CLANG format string warnings (from unix check project)
2016-06-25 13:24:48 +02:00
Dirk Ziegelmeier
102f5882d5
Fix several CLANG format string warnings
2016-06-25 13:06:31 +02:00
Dirk Ziegelmeier
8dc77ef558
doxygen updates - include IPv6 in documentation. Exclude include/netif/ppp/polarssl.
...
Convert TODO -> @todo
2016-06-22 20:18:23 +02:00
goldsimon
6d95a34971
icmp ping response: fix invalid checksum (and possible assertion failure) when ip header contains options (is it correct that we mirror back all options)
2016-06-17 10:07:49 +02:00
goldsimon
61e067b98a
Check for minimum IPv4 header length in rx packets
2016-06-17 09:36:14 +02:00
Dirk Ziegelmeier
6be7e221a5
Fix a few doxygen warnings
2016-05-24 22:29:18 +02:00
Dirk Ziegelmeier
90a656ed78
Fix several doxygen errors all over the code
2016-05-23 21:18:16 +02:00
Axel Lin
7e9377a9c7
dhcp: Use LWIP_ARRAYSIZE to get the number of array entries
...
dhcp_discover_request_options is u8_t array, so the result is the same.
But use LWIP_ARRAYSIZE to get the number of array entries is better
because it works for all types.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-05-11 12:15:12 +02:00
Dirk Ziegelmeier
49badf39a1
Fix bug #47805 : dhcp_recv can dereference NULL pointer
2016-04-29 11:16:33 +02:00
Dirk Ziegelmeier
309e072238
Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4
2016-04-06 22:31:31 +02:00
sg
0731eda0b3
make autoip_supplied_address() take a const pointer, too
2016-04-05 20:38:11 +02:00
Dirk Ziegelmeier
12a4cae404
Apply [patch #8969 ] from Freddie Chopin: Constify netif in dhcp_supplied_address()
2016-04-05 13:18:27 +02:00
sg
c6b742812d
fixed bug #38203 : DHCP options are not recorded in all DHCP ack messages (patch by Florent Matignon)
2016-03-23 21:06:52 +01:00
sg
b00a17059a
fixed icmp_send_response with LWIP_HOOK_IP4_ROUTE_SRC enabled
2016-03-05 15:57:40 +01:00
sg
d2bb569ee4
bug #46094 : moved IPv4 routing hook functions down so that they implement actual routing (source-based IPv4 routing is not affected by this change)
2016-03-05 15:52:39 +01:00
sg
6b405eccd0
Tried to fix bug #47270 by accepting all ipv4 multicast packets (at IP level) when LWIP_IGMP is disabled
2016-03-04 21:57:47 +01:00
Dirk Ziegelmeier
6aed6e659f
Rework DHCP PCB handling: Old code registered one UDP PCB per netif where DHCP was active and there was a special case in udp_input() for this. New implementation uses one PCB for all netifs and removes special case in udp_input().
...
The old approach called udp_bind() on each of the PCBs, which puts them into udp_pcbs list. The PCBs were iterated on all non-DHCP udp_inputs() with no effect.
My cleanup removes the special handling in udp.c, and uses only one DHCP UDP PCB to catch all DHCP messages from all netifs. The dhcp_recv function then checks whether ip_current_input_netif() has DHCP enabled - if not, the message is ignored. The PCB is only created/registered when one or more PCBs have DHCP enabled.
2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
70f3e5ed05
Cleanup: Create new file ip.c and move dual-stack code from ipv4 and ipv6 folder in there
2016-02-26 23:04:51 +01:00
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
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
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
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
Dirk Ziegelmeier
123c8dbd6a
Fix bug #46837 Don't send dhcp_release message in dhcp_release function
2016-01-13 08:54:54 +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
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
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
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
b401f42520
minor: fixed coding style (lwip style)
2015-10-07 10:03:12 +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
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
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
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
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
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
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