Commit Graph

2836 Commits

Author SHA1 Message Date
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
4b9883a573 DNS: does not support IPv6, may return a name cased different than the request (when multiple requests are combined to one) 2014-09-15 21:56:29 +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
3c40d93f36 fixed bug #43110 (call getpeername() before listen() will cause a error) by re-sorting the error numbers and letting listen() continue on ERR_CONN 2014-09-02 22:34:53 +02:00
Simon Goldschmidt
4335e99f2e netconn_gethostbyname() needs to check for name length when LWIP_MPU_COMPATIBLE==1 2014-09-02 21:40:05 +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
5c37c63cef fixed bug #42117 lwip_fcntl does not set errno 2014-09-02 21:08:30 +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
7c9b545b30 Fixed CHANGELOG to correctly show the differences to 1.4.1 (got messed up because git master was developed in parallel to the 1.4.1 branch, both starting at 1.4.0) 2014-09-01 21:35:10 +02:00
goldsimon
678dcc2ca5 Moved IPv4/IPv6 headers to common include folder, now that their names are unique -> no need to add 3 directories to the include path when compiling lwIP 2014-09-01 17:19:08 +02:00
goldsimon
54d4d9a881 Fix warning for compilers propagating ~'ed u8_t to int... 2014-09-01 15:57:56 +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
Erik Ekman
63038e0305 Restore DHCP relay test packet numbers
These were updated in commit e1225cec5f together with other fixes
without any clear reason, and cause the test to fail.
2014-08-20 21:33:58 +02:00
goldsimon
7cea4d7df6 bug #42998: made NETIF_MAX_HWADDR_LEN overridable for some special networks 2014-08-19 16:09:00 +02:00
goldsimon
936066aa03 tiny formatting correction 2014-08-19 14:25:57 +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
1204f15bfa bug #35874 reserved identifier violation, 2nd part 2014-05-20 12:27:18 +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
Simon Goldschmidt
dbd125c714 Fixed bug #35874 reserved identifier violation (removed leading underscores from header include guards) 2014-05-19 21:46:18 +02:00
Simon Goldschmidt
695e001984 lwip_gethostbyname: fixed using uninitialized variable when LWIP_DNS_API_HOSTENT_STORAGE==1 2014-05-15 21:17:41 +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
a7745e9a86 PPP, PPPoE, fixed bug #42138, pppoe_destroy() called with wrong pointer, PPPoE control block was never freed 2014-04-19 23:38:24 +02:00
Sylvain Rochet
3fd7bc8058 PPP, updated pppd followup 2014-04-15 22:57:59 +02:00
Sylvain Rochet
25e398a8f0 PPP, from PPPD upstream, accept IPCP ConfAck packets containing MS-WINS options
pppd: Accept IPCP ConfAck packets containing MS-WINS options

Since last week I'm seeing IPCP negotiations going like this (and
eventually failing) when connecting to my ISP:

Jul 11 20:03:25 * pppd[4833]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1
0.0.0.0> <ms-dns2 0.0.0.0>]
Jul 11 20:03:26 * pppd[4833]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1
0.0.0.0> <ms-dns2 0.0.0.0>]
Jul 11 20:03:26 * pppd[4833]: rcvd [IPCP ConfNak id=0x2 <addr 10.167.246.198>
<ms-dns1 213.162.69.1> <ms-dns2 213.162.69.169> <ms-wins 124.6.168.55> <ms-wins
17.17.17.17>]
Jul 11 20:03:26 * pppd[4833]: sent [IPCP ConfReq id=0x3 <addr 10.167.246.198>
<ms-dns1 213.162.69.1> <ms-dns2 213.162.69.169> <ms-wins 124.6.168.55> <ms-wins
17.17.17.17>]
Jul 11 20:03:26 * pppd[4833]: rcvd [IPCP ConfAck id=0x3 <addr 10.167.246.198>
<ms-dns1 213.162.69.1> <ms-dns2 213.162.69.169> <ms-wins 124.6.168.55> <ms-wins
17.17.17.17>]
Jul 11 20:03:27 * pppd[4833]: sent [IPCP ConfReq id=0x3 <addr 10.167.246.198>
<ms-dns1 213.162.69.1> <ms-dns2 213.162.69.169> <ms-wins 124.6.168.55> <ms-wins
17.17.17.17>]
...

with the last two lines repeating until the IPCP error limit is
reached. As you can see, the peer added two extra fields in the
ConfNak reply. This is allowed, and indeed the following sent
ConfReq packet reflects this. However, when the ConfAck packet
is received, pppd discards it as invalid, because of the ms-wins
fields.

This fixes it.
2014-04-15 22:55:28 +02:00
Sylvain Rochet
c31b03327f PPP, from PPPD upstream, Don't crash if NULL pointer passed to vslprintf for %q or %v
pppd: Don't crash if NULL pointer passed to vslprintf for %q or %v

This is to avoid crashes like that reported in
https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1244714
2014-04-15 22:50:53 +02:00
Sylvain Rochet
f6d56e2937 PPP, from PPPD upstream, take out unused %r conversion completely,
pppd: Take out unused %r conversion completely

This just removes some code surrounded by #if 0/#endif, which Fedora
apparently feels the need to patch...
2014-04-15 22:34:24 +02:00
Sylvain Rochet
ca7769e041 Merge branch 'master' into ppp-new 2014-04-12 01:25:00 +02:00
Sylvain Rochet
c0aef7dd6b PPP, VJ compression enabled, fixed IP forward from PPP to Ethernet by allocating a PBUF_LINK instead of a PBUF_RAW if IP forwarding is enabled 2014-04-12 01:23:57 +02:00
Sylvain Rochet
4283ecf774 PPP, PPPoS, fixed IP forward from PPP to Ethernet by allocating PBUF_LINK instead of PBUF_RAW if IP forwarding is enabled 2014-04-11 22:31:01 +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