Commit Graph

3896 Commits

Author SHA1 Message Date
Dirk Ziegelmeier
0c673b6a44 Implement new style TCP dual-stack in netconn API 2016-03-02 23:46:22 +01:00
Dirk Ziegelmeier
e89b48d23f raw.c: Avoid NULL pointer dereference 2016-03-02 23:44:51 +01:00
Dirk Ziegelmeier
f9ce31f98b TCP: Implement dual stack support using new IP_ANY_TYPE introduced at UDP 2016-03-02 23:14:33 +01:00
Dirk Ziegelmeier
bd131e5e4b ip_addr.h: Update ip_addr_copy macro to correctly copy new IP_ANY_TYPE address 2016-03-02 23:11:34 +01:00
Dirk Ziegelmeier
f3132c5290 udp: Fix possible NULL pointer dereference, update comments 2016-03-02 23:10:43 +01:00
Dirk Ziegelmeier
babb247e2a SNMP MIB2: Fix temporary OID buffer size some tables have been too small 2016-03-02 23:09:51 +01:00
Dirk Ziegelmeier
cc4f94f415 lowpan6: Fix incorrect array bounds check (found by Coverity) 2016-03-02 19:45:15 +01:00
Dirk Ziegelmeier
9885d5d9f5 Apply patch from Simon to fix buffer overflow handling tcp_in.c which was discovered by Coverity 2016-02-29 23:34:52 +01:00
Dirk Ziegelmeier
8e5663a32f Minor: Avoid ip_input() call indirection for when only IPv4 or IPv6 are enabled 2016-02-29 22:17:42 +01:00
Dirk Ziegelmeier
4bbfc3857a Implement dual-stack in SNMP for netconn API 2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
5404ce3c0a Implement support for UDP IP_ANY_TYPE in netconn API 2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
2289673a30 Implement support for IP_ANY_TYPE in SNMP 2016-02-29 19:31:19 +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
42c92f80f1 Add compatibility macro for udp_new_ip6() 2016-02-29 13:25:13 +01:00
goldsimon
fa16ee8dcb cleaned up includes a bit after IPv6 changes 2016-02-29 09:27:59 +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
2dc8f59bf4 Fix compile when PPPOE is enabled 2016-02-26 22:50:44 +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
goldsimon
81c8121551 minor: fixed compiler warning "unary minus operator is applied to an unsigned expression" 2016-02-26 15:23:04 +01:00
goldsimon
97b7555119 bring back ETHARP_HWADDR_LEN (if anyone uses it) 2016-02-26 14:21:03 +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
163d7f9791 added ethernet.c to Filelists.mk 2016-02-25 22:11:16 +01: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
Joel Cunningham
2a8398dfb8 Fix bug in FIONREAD handling in LINUXMODE
Fix a bug in the socket API's ioctl for FIONREAD. If the socket's
lastdata was assigned the function returned without error but did not
update the argument pointer.

The cast type for argp was also changed to int to conform with the
other SO_RCVBUF handling.
2016-02-25 12:53:12 -06: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
sg
68590c2b27 minor/coding style: lowpan6_opts.h: tabs->spaces, trim trailing spaces 2016-02-24 22:03:40 +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
3b5803ec9a sys.h: Avoid un #defined LWIP_COMPAT_MUTEX macro (usually #defined in arch/sys_arch.h) 2016-02-23 15:49:58 +01:00
Dirk Ziegelmeier
fd4a109ffa lowpan6.c: Implement SNMP counters 2016-02-23 13:01:46 +01:00
Dirk Ziegelmeier
481d350bf3 lwip/stats.h: Add some comments to MIB2 variables to explain correct usage a bit 2016-02-23 12:08:31 +01:00
Dirk Ziegelmeier
d121ea84d0 Add note about 6LoWPAN in src/netif/FILES 2016-02-23 11:46:28 +01:00
goldsimon
a5ac41c203 lowpan6: fixed compiler warning when casting u16_t to u8_t 2016-02-23 11:28:54 +01:00
goldsimon
e4457335b8 minor: tried to fix coding style in lowpan6.c 2016-02-23 10:36:16 +01:00
Dirk Ziegelmeier
680f8f31ab I don't know why I have a diff here (I guess line ending problems like in my last lowpan6.c commit)... 2016-02-23 10:20:05 +01:00
Dirk Ziegelmeier
6650eb4cd2 snmp_traps.c: Fix compile on Win32 - missing string.h include
Catch possible strlen returnvalue > 0xffff
2016-02-23 10:06:46 +01:00
Dirk Ziegelmeier
799fe7a5ba Fix shadowing warning in lowpan6.c - found by Erik Ekman's Travis CI
https://travis-ci.org/yarrick/lwip-merged
2016-02-23 08:58:34 +01:00
Dirk Ziegelmeier
9a4d7b9956 Use netif_input_fn typedef instead of creating a new one in tcpip.h 2016-02-22 21:10:50 +01:00
Dirk Ziegelmeier
fe8d2ba72f Eliminate tcpip_pppos_input function 2016-02-22 21:00:00 +01:00
Dirk Ziegelmeier
e90591bb78 Add note to CHANGELOG about 6LoWPAN 2016-02-22 20:46:15 +01:00
Dirk Ziegelmeier
e2a3565971 Initial import of Ivan Delamer's 6LoWPAN implementation with slight modifications to allow compiling in IPv6 only mode 2016-02-22 20:44:32 +01:00
Dirk Ziegelmeier
aeab047ede slipif: Fix compile when only IPv6 is enabled 2016-02-22 20:43:32 +01:00
Dirk Ziegelmeier
777e667f08 Add generic tcpip_inpkt function that can be called to make last changes really usable 2016-02-22 20:18:10 +01:00
Dirk Ziegelmeier
fa6f068fd1 Eliminate TCPIP_MSG_INPKT_PPPOS message type.
Fix my last commit, I accidentally unchecked the wrong file in commit dialog
2016-02-22 17:47:01 +01:00
Dirk Ziegelmeier
439ae629e0 Change TCPIP INPKT API message to take a function pointer. Allows integration of other protocols without extending lwIP core (e.g. 6LoWPAN)
Remove unused sem member of struct tcpip_msg
2016-02-22 17:39:01 +01:00