sg
83740d81f2
fixed comment
2015-02-25 21:32:33 +01:00
sg
c8581e4cd9
fixed bug #38165 (socket with mulicast): ensure igmp membership are dropped when socket (not netconn!) is closed.
2015-02-25 21:30:22 +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
sg
3e8ac30940
Fixed bug #44297 (CORE_LOCKING was broken some days ago); fixed that netconn_connect still used message passing for LWIP_TCPIP_CORE_LOCKING==1
2015-02-25 20:34:18 +01:00
Sylvain Rochet
4bcddd72e6
PPP, CORE, cleaned ppp_close() function
...
Calling new_phase() instead of assigning pcb->phase directly.
Removed redundant call to link status callback.
2015-02-24 22:13:04 +01:00
Sylvain Rochet
00bb70a62d
PPP, CORE, functions ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() replaced with defines
...
PPP is now pointerful for a while, we don't need anymore accessor functions
for the unique PPP local and static control block. Replaced
ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() functions to
defines.
Removed pppapi_do_ppp_set_netif_statuscallback() and
pppapi_do_ppp_set_netif_linkcallback(), they were useless because
netif_set_status_callback() and netif_set_link_callback() can be
safely called while PPP status is in dead (= non open) state
and even before the PPP session is actually created at all.
2015-02-24 20:41:47 +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
Sylvain Rochet
65095253a9
PPP, fixed warnings introduced by const pointers on ip_addr_t
2015-02-22 22:38:02 +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
03159254ce
added proper accessor functions for pcb->multicast_ip (previously used by get/setsockopt only)
2015-02-22 21:49:46 +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
df3f05e824
PPP, apply warnings found by MSVC fixes on other files needing the same fix
2015-02-22 21:39:04 +01:00
sg
9a10afbbc6
PPP: fixed 2 warnings found by MSVC
2015-02-22 21:30:17 +01:00
Sylvain Rochet
8d916b8573
PPP, PPPoS, removed unused next field in pppos_pcb
...
Linked list was removed, we don't need the next pointer anymore.
2015-02-22 16:57:57 +01:00
Sylvain Rochet
653657ae43
PPP, code cleaning
2015-02-22 16:45:38 +01:00
Sylvain Rochet
b0b7240022
PPP, PPPoS, moved advise about modem from pppos_create() to ppp_open()
...
pppos_create() can be called whether the modem is ready to process the
PPP session since pppos_create() does not start the PPP session anymore,
moved the advise from pppos_create() to ppp_open().
2015-02-22 16:20:03 +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
4be7fccad3
PPP, CORE, ppp_close() and ppp_sighup() ended up sharing almost everything, merged
...
Merged ppp_sighup() to ppp_close() using an optional argument "nocarrier"
on ppp_close().
2015-02-22 14:25:36 +01:00
Sylvain Rochet
b040ace4c2
PPP, CORE, carrier lost signal, fixed FSM mismatch
...
ppp_sighup() hard change the PPP FSM phase, it ends up with a FSM
mismatch if PPP is currently connecting or disconnecting.
Only do "sighup" on the stable running phase, fallback to the close
method. Handle special DEAD and HOLDOFF states as well.
2015-02-22 13:54:52 +01:00
Sylvain Rochet
ab572ce5b9
PPP, CORE, fixed PPP phase state machine when ppp_close() is called during HOLDOFF phase
...
Aborting HOLDOFF leaves us at PPP_PHASE_DEAD, fixed.
2015-02-22 13:48:53 +01:00
Sylvain Rochet
ded77f59cd
PPP, FSM, fixed "timeout sending Config-Requests" output
...
\n is not needed, fixed.
2015-02-22 12:12:38 +01:00
Sylvain Rochet
a1c5415f8f
PPP, CORE, disable VJ is PPP IPV4 is compiled out
...
VJ compression is only supported for PPP IPv4, compile out VJ support
if PPP IPv4 is not compiled.
2015-02-22 02:34:45 +01:00
Sylvain Rochet
00e8988b52
PPP, IPv4 support is now optional
...
New compile time option: PPP_IPV4_SUPPORT
PPP IPv4 support can now be compiled out.
2015-02-22 02:28:04 +01:00
Sylvain Rochet
5680808fb6
PPP, CORE, ppp_ioctl PPPCTLG_UPSTATUS command now returns true if only IPv6 is up
...
PPPCTLG_UPSTATUS ioctl didn't return true if IPv6 was up and IPv4 down, fixed.
2015-02-22 01:34:47 +01:00
Sylvain Rochet
814bcc04ad
PPP, CORE, using ip*_set_* functions instead of IP4_ADDR and SMEMCPY
...
Now using lwIP helper functions on ip_addr_t and ip6_addr_t.
2015-02-22 01:33:02 +01:00
Sylvain Rochet
a8cbff08ef
PPP, IPV6, enable PPP IPv6 by default if LWIP_IPV6 is set
2015-02-22 00:25:23 +01:00
Sylvain Rochet
ee8a05c3c7
PPP, CORE, removed if_up and if6_up checks in sifdown() and sif6down()
...
It can't hurt us, checking is useless.
2015-02-21 23:53:40 +01:00
Sylvain Rochet
46d7f6f95d
PPP, IPv6, fixed unicode in file headers
2015-02-21 23:49:57 +01:00
Sylvain Rochet
30c89310a6
PPP, CORE, IPv6, if_up flag used instead of if6_up for outgoing IPv6 packets, fixed
...
We can have an IPv6 only PPP interface, checking if6_up instead of if_up fixes
IPv6 only setup.
ppp_netif_output() which were only used for common code between
ppp_netif_output_ip4() and ppp_netif_output_ip6() is not necessary
anymore, removed, reducing call stack by one.
2015-02-21 23:34:45 +01:00
Sylvain Rochet
d6e1b86147
PPP, CORE, improved, re-ordered and re-numbered IOCTL commands
2015-02-21 21:52:39 +01:00
Sylvain Rochet
a8e973f5d7
PPP, CORE, remove the user ability to set the PPP error code (PPPCTLS_ERRCODE)
...
This is now totally useless, it was used for the PPP core code but it is not
used anymore, remove then the user ability to set the PPP error code through
PPPCTLS_ERRCODE.
2015-02-21 21:48:53 +01:00
Sylvain Rochet
c4d1354c54
PPP, CORE, don't use ppp_ioctl() from PPP core, assign pcb->err_code instead
...
Removed useless calls to ppp_ioctl(pcb, PPPCTLS_ERRCODE, …), we now assign
pcb->err_code directly instead. ppp_ioctl() is not linked anymore if user
application don't use it.
2015-02-21 21:42:59 +01:00
Sylvain Rochet
dc2e700057
PPP, CORE, using u8_t on ioctl command instead of int
...
We don't need an int here, all commands are between 0 and 255.
2015-02-21 21:37:08 +01:00
Sylvain Rochet
bfe0c3a8e0
opt.h: fixed warnings if PPP auth support is not enabled
...
lwip/src/netif/ppp/polarssl/md4.c:43:20: warning: "LWIP_INCLUDED_POLARSSL_MD4" is not defined [-Wundef]
lwip/src/netif/ppp/polarssl/sha1.c:42:20: warning: "LWIP_INCLUDED_POLARSSL_SHA1" is not defined [-Wundef]
lwip/src/netif/ppp/polarssl/des.c:43:20: warning: "LWIP_INCLUDED_POLARSSL_DES" is not defined [-Wundef]
2015-02-21 19:43:04 +01:00
Sylvain Rochet
a387270b76
PPP, PPPoS, fixed PPP_INPROC_MULTITHREADED support
...
Oops.
2015-02-21 19:38:47 +01:00
Sylvain Rochet
59b659b027
PPP, CORE, compile out auth support if none of auth protocols are enabled
...
Added macro PPP_AUTH_SUPPORT, if none of auth protocols are enabled
(PAP, CHAP, EAP) we reduce PPP memory usage by compiling out all
struct fields and source code used for authentication.
2015-02-21 19:32:38 +01:00
Sylvain Rochet
973472c51e
opt: clarified VJ support
...
VJ is only supported for PPPoS, RFCs does not say VJ is forbidden on
PPPoE or PPPoL2TP (looks like it is strongly discouraged though, due
to checksum issues when using VJ).
2015-02-21 18:43:31 +01:00
Sylvain Rochet
f57d4818a4
PPP, using PPP netif->num number instead of ppp->num
...
Saved 2 bytes of RAM if debug is enabled, we are now using the
netif->num number instead of using our own ppp->num
2015-02-21 01:21:24 +01:00
Sylvain Rochet
6b4db944dd
PPP, using err_t return code instead of PPPERR_
...
Standardised PPP API to follow lwIP already used return codes.
PPPERR_ are now used only on link status callback.
2015-02-20 21:24:58 +01:00
Sylvain Rochet
0a761d238a
PPP, using err_t return type on ppp_ioctl()
2015-02-20 21:01:24 +01:00
Sylvain Rochet
c8f026c382
PPP, PPPoS, removed PPPERR_ on err_t return type
2015-02-20 20:54:05 +01:00
Sylvain Rochet
2c70c12814
PPP, PPPoL2TP, removed PPPERR_ usage
...
Low level protocol callbacks are using err_t returns type,
don't use PPPERR_ on them.
2015-02-20 20:52:10 +01:00
Sylvain Rochet
b31f6eb45f
PPP, PPPoE, removed PPPERR_ usage
...
Low level protocol callbacks are using err_t returns type,
don't use PPPERR_ on them.
2015-02-20 20:51:37 +01:00
Sylvain Rochet
d387c1c83a
PPP, PPPoS, added missing static modifier on pppos_netif_input()
2015-02-20 19:35:12 +01:00
Sylvain Rochet
7a1a2b9aa6
PPP, PPPoS, code cleaning
2015-02-20 01:00:48 +01:00
Sylvain Rochet
444da3ecec
PPP, CORE, we don't need PPP_LINK_ENABLED_NUMBER anymore
2015-02-20 00:44:58 +01:00
Sylvain Rochet
1918914598
PPP, PPPoS, removed linked list
...
We don't need anymore the PPPoS linked list since we have callbacks
for everything.
2015-02-20 00:40:45 +01:00
Sylvain Rochet
29f3f2e1d8
PPP, PPPoS, moved VJ protocol handler to PPPoS
...
New callback, netif input, allow low level drivers to extend
ppp_input call, moved PPPoS VJ support to pppos.c.
2015-02-20 00:40:45 +01:00
Sylvain Rochet
759d11ce1a
PPP, CORE, beautified ppp_ioctl()
2015-02-20 00:40:45 +01:00
Sylvain Rochet
729e24da78
PPP, PPPoS, added sub-ioctl commands
...
Allow low level drivers to extend ioctl call, moved PPPoS ioctl
commands to pppos.c.
2015-02-20 00:40:45 +01:00
Sylvain Rochet
ec362536f5
PPP, uniformised callbacks naming
2015-02-20 00:40:45 +01:00
Sylvain Rochet
b92fe3eecb
PPP, CORE, new callbacks, send_config, recv_config, vj_config
...
Removed some calls from PPP core to PPPoS low level protocols,
the const struct allows us to have more and more callbacks
without using more RAM.
2015-02-20 00:40:44 +01:00
Sylvain Rochet
985de035bc
PPP, CORE, now using const callbacks struct from lower level protocols
...
Saving some RAM by using callbacks struct in rodata for required
callbacks called by PPP core to PPP low level protocols.
2015-02-20 00:40:44 +01:00
Sylvain Rochet
2e40ceaaa4
CORE, enabling only PPPoL2TP is also a valid choice
2015-02-20 00:40:44 +01:00
Ivan Delamer
02a797f9f9
Modified netif flag values.
2015-02-19 16:25:30 -07:00
Ivan Delamer
b938154f6b
Removed unused netif flag for DHCP
2015-02-19 16:22:19 -07:00
Ivan Delamer
e312ebcb57
Removed unused netif flag for point to point connections
2015-02-19 16:19:29 -07:00
Sylvain Rochet
02cf50063e
PPP, PPPoX, added warnings about functions in headers which should not be called from lwIP user application
2015-02-18 23:14:30 +01:00
Sylvain Rochet
f511bec26c
PPP, PPPoS, only check PPPoS PCB pointer if PPPoS is not the only enabled lower protocol
...
We only need to keep track of existing PPPoS interfaces if PPPoS
is not the only enabled protocol.
PPP CORE does not have callbacks pointers for all PPPoS callbacks
which should actually be required for PPPoS (VJ config, asyncmap, ...),
there is too much callbacks to create and PPPoS must be kept light,
especially for users who are only using PPPoS.
But there is a drawback, PPP CORE does not know which
lower protocols it is talking to thanks to the abstraction,
therefore if PPPoS is enabled as well as PPPoE or PPPoL2TP there
might be situation where PPP CORE calls pppos_ config functions
on interfaces which are NOT PPPoS one. This is very unlikely to
happen because protocols not supported by PPPoE or PPPoL2TP are
disabled at LCP/IPCP negotiation but we are better safe than sorry.
So we check if passed PPP pointer to PPPoS configuration functions
is a PPPoS interface by checking against a linked list of existing
PPPoS interfaces.
2015-02-18 23:14:30 +01:00
Sylvain Rochet
9f93c16bbf
PPP, CORE, beautified auth protocols debug
2015-02-18 23:14:29 +01:00
Sylvain Rochet
892e75ca92
PPP, CORE, removed useless include of chap-new.h
2015-02-18 23:14:29 +01:00
Sylvain Rochet
5e73068e09
PPP, CORE, Removed (*datainput) from struct protent if not used
...
Data input is only used by CCP and ECP, which are not supported at this time,
remove this entry from struct protent to save some flash.
2015-02-18 23:14:29 +01:00
Sylvain Rochet
b71d9ce3f6
PPP, CORE, Removed useless enabled_flag from struct protent
...
Our struct protent are const everywhere to save RAM, enable/disable
flag on a const struct is useless, saving some flash, removed.
2015-02-18 23:14:29 +01:00
sg
730529353d
fixed bug #37958 "netconn API doesn't handle correctly connections half-closed by peer"
2015-02-18 22:21:26 +01: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
sg
2cfc9e286e
"Not connected" shouldn't be fatal (as opposed to "closed")
2015-02-18 20:39:20 +01:00
sg
998ed99288
Fixed select not reporting received FIN as 'readable' in certain rare cases (bug #43779 : select(), close(), and TCP retransmission error)
2015-02-18 20:38:42 +01:00
goldsimon
9048a7f021
fixed compiler warning in dhcp.c
2015-02-18 09:02:37 +01:00
Sylvain Rochet
1c91bb5a20
PPP, PPPoS, fixed warnings with PPPDEBUG disabled
2015-02-18 00:59:27 +01:00
Sylvain Rochet
19fdeae4ba
PPP, chained returns up to ppp_free()
...
ppp_free() now returns lower level protocol return value if something failed.
2015-02-17 23:22:15 +01:00
Sylvain Rochet
50ecd2c12c
PPP, CORE, removed useless st variable in ppp_close()
...
Code cleaning.
2015-02-17 23:22:15 +01:00
Sylvain Rochet
07f9212799
PPP, chained returns up to ppp_open()
...
ppp_open() now returns lower level protocol return value if something failed.
2015-02-17 23:22:15 +01:00
Sylvain Rochet
8a8cba75a2
PPP, lower protocols, chained returns from local functions to callback caller
...
PPPoS,PPPoE,PPPoL2TP functions using non-void returns are now propagated
to callback caller (PPP core).
2015-02-17 23:22:15 +01:00
Sylvain Rochet
1ae3808e13
PPP, CORE, prepared for lower protocols callbacks returning state
...
Until now, callbacks used void return, preparing callbacks to return
PPPERR_ status.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
ee2936ffbf
PPP, all protocols, uniformised naming
...
Uniformised fonction naming between and inside PPPoS, PPPoE, PPPoL2TP.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
5b29f1cdec
PPP, CORE, Fixed warning with PPP_PROTOCOLNAME enabled
...
lwip/src/netif/ppp/ppp.c: In function ‘ppp_input’:
lwip/src/netif/ppp/ppp.c:769:5: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
const char *pname = protocol_name(protocol);
^
2015-02-17 23:22:14 +01:00
Sylvain Rochet
bce29ac353
PPP, CORE, code cleaning
...
Reordered functions in the order they are declared in headers.
Removed useless ppp_link_down() function.
Merged ppp_stop() and ppp_close().
Merged ppp_hup() and ppp_sighup().
2015-02-17 23:22:14 +01:00
Sylvain Rochet
f7584fa883
PPP, CORE, fixed callbacks return value
...
Fixed return value in case of abnormal termination.
Set pcb->err_code in case of failed setup link.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
18074ff98f
PPP, PPPoE, improved removal from linked list
...
Replaced naive link list removal code to a more clever one.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
4ad60b477c
PPP, PPPoS, structure size optimisation
...
Reordered PPPoS structure so there is no alignment hole for 32 and 64 bits
systems. Reduced types which were too large.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
69469496e2
PPP, PPPoS, moved out_accm from PPP core to PPPoS
...
Last PPPoS variable in PPP core moved to PPPoS.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
baaa2592a6
PPP, PPPoS, removed xmit_accm, almost duplicate of out_accm
...
xmit_accm was meant to be a user configurable asyncmap, it was actually
broken since the introduction of ppp_new by the way we now reset the PPP
initial state, looks like no one until now is needing it anymore. If
necessary we will reintroduce this feature later properly instead of a
dirty and ugly hack into the PPP code.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
ecb8aa6fc1
PPP, PPPoS, merged ppp(os)_pcb_rx to pppos_pcb
...
Merged ppp(os)_pcb_rx to pppos_pcb, saved 8 bytes of pointers
and unecessary init steps.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
34210901bf
PPP, PPPoS, moved ppp.rx to pppos.rx
...
PPP rx control block moved to PPPoS
2015-02-17 23:22:14 +01:00
Sylvain Rochet
7132893863
PPP, PPPoS, re-enabled PPPCTLG_FD
...
Found a fine way to get PPP fd without making this call crash for for PPPoE
or PPPoL2TP.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
cfe04d4453
PPP, PPPoS, using PPPoS PCB pointer on VJ and pppos_ configuration functions
...
Slightly more consistent this way, and prevent using link_ctx_cb pointer
from PPPoS protocol file.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
f98f2890f3
PPP, PPPoS, check if PPPoS configuration functions are used on PPPoS
...
We don't have callbacks which can be set or cleared for PPPoS
configuration, there is too much callbacks to create and PPPoS must be
kept light, therefore PPPoS functions can be called when PPP core
configure a PPPoE or PPPoL2TP interface, this is very unlikely to
happens because protocols not supported by PPPoE or PPPoL2TP are
disabled at LCP/IPCP negotiation but being safe is still better.
Check if passed PPP pointer to PPPoS configuration functions is a PPPoS
interface by using a linked list of exiting PPPoS interfaces.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
d93c21349f
PPP, PPPoS, fixed build with PPP_FCS_TABLE=1
...
Oops, I managed to break builds with PPP_FCS_TABLE=1, fixed.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
9358dbbd99
PPP, PPPoS, various static and const added
...
ppp_get_fcs() is now static, const modifier added on ppp_accm_mask
2015-02-17 23:22:13 +01:00
Sylvain Rochet
2b9d304816
PPP, PPPoS, renamed *sc pointer to *pppos, renamed *pcb pointers to *pppos and *ppp
...
It was a bit confusing and error prone having *pcb pointers for both
ppp_pcb* and pppos_pcb*, fixed confusion with a strict naming for both.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
e6465a6f44
PPP, PPPoS, moved VJ from PPP core to PPPoS
...
VJ is only available for PPPoS, moved VJ from PPP CORE to PPPoS.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
4aa9244b92
PPP, PPPoS moved fd from ppp_pcb to pppos_pcb
...
Moved fd from ppp_pcb to pppos_pcb.
However PPP ioctl PPPCTLG_FD is temporarily disabled until I found a
better solution.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
1ac4d1b793
PPP, PPPoS needs vj.h
2015-02-17 23:22:13 +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
Sylvain Rochet
9c15ffbb74
PPP: Moved PPPoS from ppp.c to pppos.c
...
Started removing from PPP core most of low level protocol PPPoS
handling to separate files, using the new low level PPP callbacks.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
09b4485870
PPP, generalized callbacks calls from PPP core, removed all PPPoE and PPPoL2TP references
...
Almost there, removed all PPPoE and PPPoL2TP references from PPP core,
using the generic callbacks interface everywhere.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
19282d6d6c
PPP, moved low level protocol connect init to low level protocol files
...
Low level protocol init machine state does not belong to PPP core,
moved those init to respective low level protocol files.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
ee85aaccd2
PPP, removed low level create functions from PPP core
...
ppp_over_ethernet_create() moved from ppp.c to pppoe.c
ppp_over_l2tp_create() moved from ppp.c to pppol2tp.c
2015-02-17 23:22:13 +01:00
Sylvain Rochet
0afc34f6fc
PPP, moved ppp_write and ppp_netif_output low level protocols functions to respective low level protocol files
...
Moved ppp_write_over_ethernet() and ppp_netif_output_over_ethernet() to pppoe.c
Moved ppp_write_over_l2tp() and ppp_netif_output_over_l2tp() to pppol2tp.c
2015-02-17 23:22:13 +01:00
Sylvain Rochet
45bfccfddc
PPP, prepare new callbacks for low level protocols
...
New callbacks: write and netif_output
2015-02-17 23:22:13 +01:00
Sylvain Rochet
f8501478f6
PPP: prepared callbacks from PPP core to low level protocols
...
New PPP callback from PPP core to low level protocols, first
step about removing named calls to low level protocols from PPP core.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
a5582e0960
PPP: re-order functions in the common sense API order
...
Re-order ppp.[ch] functions in the order functions should be called from
user application. Moved create functions, which actually return a PPP
control block before functions needing a PPP control block.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
b4fe72c4a2
PPP: removed duplicated code in ppp_close()
...
Looks like previous refactoring and cleaning made ppp_close()
consistent for all our low level protocol backends, cleaned
up duplicated code.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
48f7678771
PPP: re-order prototypes, ppp_init before ppp_new
...
Cosmetic only.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
808098413c
PPP: removed PPPoE and PPPoL2TP callback status notifier
...
Added necessary PPP core functions for PPPoE and PPPoL2TP status
notificaton (ppp_link_failed and ppp_link_end), removed callback,
low level protocol are now calling PPP core "link" functions.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
74fd2dc9ad
PPP: moved ppp_new() to low level protocol init for PPPoE and PPPoL2TP
...
First step of a rework of how low level protocols are using the
PPP core. Low level protocols are now going to use the core instead
of core using the low level protocols.
Final goal: separate PPP core code from low level protocols.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
443b2551c7
PPP: moved duplicated init code from ppp_over_X_create() to ppp_new()
...
Some init code were duplicated for all low-level PPP protocols, moved
uselessly duplicated code to ppp_new().
2015-02-17 23:22:12 +01:00
Sylvain Rochet
7b681bc94a
PPP: re-order functions in the common sense API order
...
Re-order ppp.[ch] functions in the order functions should be called from
user application. Moved create functions, which actually return a PPP
control block before functions needing a PPP control block.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
bd29f7168c
PPP: ppp_init() is not a public function, moving it in private part
...
ppp_init() is not a public fonction anymore, move this function
in ppp.c "private" functions.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
c8c0dc2f53
PPP: using a macro for ppp_set_default() instead of a function
...
This function is only calling netif_set_default(), a macro
is adequate.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
17c6be6a9b
PPP: removed ppp_delete(), merged with ppp_free()
...
The only benefit of ppp_delete() call was about having a persistent
netif interface. netif was moved out of PPP pcb so we don't need
ppp_delete() anymore, second step in simplifying the weird
new/open/free/delete PPP API.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
318e752fd6
PPP: removed ppp_new(), merged with ppp_over_X_create()
...
The only benefit of ppp_new() call was about having a persistent netif
interface. netif was moved out of PPP pcb so we don't need ppp_new()
anymore, first step in simplifying the weird new/open/free/delete PPP
API.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
3dcfd7ba41
PPP: moved netif out of PPP control block
...
Users might want to share a netif control block between an Ethernet
interface and a PPPoS interface (I want actually) in case PPP is just
used as redundancy if Ethernet is down (eg. PPPoS GPRS fail over).
Moved netif out of PPP control block in a similar way it is currently
done for Ethernet interfaces. Furthermore, this is a first step on
removing the "new/create/free/delete" API which is awful but currently
necessary to handle fail over from PPPoX to another PPPoX (eg. from PPoE
on xDSL to PPPoS on GPRS fail over) without free()ing the netif which
might be used on udp_sendto() or L2TP VPN links.
2015-02-17 23:22:12 +01:00
sg
604a92dc3d
fixed bug #38853 "connect() use a wrong errno": return ERR_ALREADY/EALRADY during connect, ERR_ISCONN/EISCONN when already connected
2015-02-17 22:10:23 +01:00
sg
b146ae96a7
sockets.c: removed LWIP_TCPIP_CORE_LOCKING hack in lwip_sendto(): since all functions are static when LWIP_NETCONN==0, the speedup gained by this hack should now be minimal and not worth the duplicate code.
2015-02-17 21:26:40 +01:00
goldsimon
0963e91c34
api_msg_c: fixed compiler warning (added brackets in if statement)
2015-02-17 09:38:20 +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
Sylvain Rochet
99d1fdd270
snmp: syntax error fix on endif comment
...
*/ omitted on comment, added.
2015-02-14 19:38:35 +01:00
Sylvain Rochet
10ab72855d
opt: fix build without SNMP_COMMUNITY_EXT
...
define value omitted on #define SNMP_COMMUNITY_EXT in opt.h, default is 0
2015-02-14 19:38:29 +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
sg
723eaa1f40
Fixed compiler warning in snmp.h introduced by last patches
2015-02-14 15:04:55 +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
chrysn
81d4e201bb
include the memp struct list once before actually using it
...
when custom lwipopts.h files are used (MEMP_USE_CUSTOM_POOLS), there is
typically the need to use sizeof(some_struct) in there, but on structs
that are not already declared in lwip; thus, they use #include on custom
headers.
even if the included files have proper include guards, the way memp
headers are used (
typedef enum {
#define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name,
#include "lwip/memp_std.h"
MEMP_MAX
} memp_t;
) breaks when fresh includes are involved. in this patch, this gets
circumvented by including lwip/memp_std.h once with an empty
LWIP_MEMPOOL definition, so that all the includes from custom
lwippools.h files can be handled safely.
2015-02-11 23:10:15 +01:00
sg
8155b8cfb3
patch #7702 "Include ability to increase the socket number with defined offset"
2015-02-11 23:05:52 +01:00
sg
276e35ecfb
Fixed a bug in linger-closing when LWIP_TCPIP_CORE_LOCKING==1
2015-02-11 22:53:19 +01:00
sg
7d8657287e
patch #8362 Add defines for well known ethernet packet types
2015-02-11 21:59:48 +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
Fred Baksik
3870031c6e
LWIP_ASSERT: check for LWIP_PLATFORM_ASSERT if LWIP_NOASSERT is not defined.
...
-- add comment about usage of LWIP_NOASSERT
2015-02-11 21:43:40 +01:00
sg
060a1fc727
patch #8481 Fix a couple of c&p mistakes in the error prints
2015-02-11 21:39:45 +01:00
sg
28783abbe2
fixed bug #43094 "The function tcpip_input() forget to handle IPv6"
2015-02-11 21:36:46 +01:00
sg
974a853f40
patch #8423 "arch/perf.h" should be made an optional item
2015-02-11 21:25:47 +01:00
sg
7ff9825f55
started to implement fullduplex sockets/netconns (note that this is highly unstable yet!)
2015-02-11 21:18:15 +01:00
sg
04b4971d8c
Added comment that sys_thread_new must not fail (ports have to assert this!)
2015-02-11 21:12:49 +01:00
sg
6c3f6cfd89
netconn/socket api: fixed bug #44225 "closing TCP socket should time out eventually", implemented task #6930 "Implement SO_LINGER": closing TCP sockets times out after 20 seconds or after the configured SND_TIMEOUT or depending on the linger settings; fixed that netconn_close/netconn_delete still used message passing for LWIP_TCPIP_CORE_LOCKING==1
2015-02-10 22:15:54 +01:00
sg
ee833ea594
changed comment in struct linger
2015-02-10 21:40:27 +01:00
goldsimon
338feef70e
memp: also export memp_sizes[] if MEMP_USE_CUSTOM_POOLS==1
2015-02-10 15:18:14 +01:00
sg
ec68aaf43b
fixed that SHUT_RD followed by SHUT_WR was different to SHUT_RDWR, fixed return value of lwip_netconn_do_close on unconnected netconns
2015-01-27 21:28:39 +01:00
goldsimon
24df78bcbc
fixed that lwip_netconn_do_delconn() did not set msg->err on success (just introduced that bug this weekend...)
2015-01-20 14:01:16 +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
05aa0ad114
netconn_delete(): check for errors returned by lwip_netconn_do_delconn() and don't call netconn_free() on error
2015-01-17 21:54:17 +01:00
sg
5ceaed291f
fixed bug #43361 select() crashes with stale FDs
2015-01-17 21:02:58 +01:00
sg
48934414b2
patch #8479 Fixed a visibility scope that caused a compile error in some configurations (by Constantine <nongnusucks>)
2015-01-17 14:55:32 +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
sg
5d2e93e5f0
fixed bug #40788 "lwip_setsockopt_internal() crashes" by rewriting set/getsockopt functions to combine checks with the actual code and add more NULL checks; this also fixes that CORE_LOCKING used message passing for set/getsockopt.
2015-01-17 14:18:27 +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
5dd6b1effc
PPP, updated pppd followup
2014-12-24 23:23:36 +01:00
Sylvain Rochet
369e9fbf08
PPP, from PPPD upstream, Eliminate some unnecessary ifdefs
2014-12-24 23:12:30 +01:00
Sylvain Rochet
e39d012312
PPP, from PPPD upstream, separate IPv6 handling for sifup/sifdown
...
The current code is buggy regarding handling of link state when using
both IPCP and IPv6CP: if IPv6CP has been set up and if during IPCP
negociation, ipcp_up() fails, it will incorrectly take the interface
down. The simple solution here is to change the platform code to do the
same as on Solaris: separate IPv6CP up/down state handling with sif6up()
and sif6down(), so that we really know when the interface is allowed to
go down.
(Based from pppd commit b04d2dc6df5c6b5650fea44250d58757ee3dac4a)
2014-12-24 23:01:06 +01:00
Sylvain Rochet
7d077a2260
PPP,SLIP include lwip/sio.h after lwip/sys.h to prevent functions prototype collision
...
User port may redefine sio_* functions, we must ensure we are loading
user functions prototypes before loading default prototypes.
2014-12-24 21:23:54 +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
91356d2d03
PPPAPI, added const modifier on auth strings
2014-12-24 19:05:19 +01:00
Sylvain Rochet
61f0231ce0
PPP, fixed more compiler warnings
...
Using -Wall -pedantic -Wparentheses -Wsequence-point
-Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith
-Wbad-function-cast -Wc++-compat -Wwrite-strings -Wold-style-definition
-Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address
2014-12-24 18:14:10 +01:00
Sylvain Rochet
482a18e6de
PPP, added const modifier on auth strings
2014-12-24 17:17:00 +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
Sylvain Rochet
2b3e020152
PPP, fixed some compiler warnings
...
Using -Wall -pedantic -Wparentheses -Wsequence-point
-Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith
-Wbad-function-cast -Wc++-compat -Wwrite-strings -Wold-style-definition
-Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address
2014-12-24 15:16:03 +01:00
goldsimon
01391f0234
etharp: fixed casting 'ctime' from u16_t to u8_t in local variables (introduced when fixing bug #34682 )
2014-12-22 11:21:18 +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
a883fe7b8e
sockets.c: fixed assert check after changing type of sock->select_waiting to unsigned
2014-12-17 16:21:44 +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
sg
8e13bcd43d
fixed indentation
2014-12-10 21:24:02 +01:00
sg
cacdbb5262
added option LWIP_NETCONN_SEM_PER_THREAD to use a semaphore per thread instead of using one per netconn and per select call
2014-12-10 20:45:01 +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
goldsimon
dbe33783c9
stats: place 'err' in stats_mem more at the front to better see it in debugger overview window
2014-12-10 09:48:00 +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
1bf2e313f6
sockets.c: fixed using unsigned constant 'FIONBIO' in switch on (signed) long
2014-12-08 15:01:18 +01:00
goldsimon
ca26fd17a7
fixed bug #43778 : IPv6 header version not set on 16-bit platform (macro IP6H_VTCFL_SET())
2014-12-08 15:00:37 +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
chrysn
36f470383b
use u32_t instead of u_int32_t
...
The style u_int32_t is not used anywhere else in the project, and is not
supported by the C standard, now using lwIP u32_t type. It was introduced
in 25e398a
.
2014-11-11 16:28:27 +01:00
Sylvain Rochet
52dc9ef418
slightly improved compiler warning fixes
2014-11-07 16:26:15 +01:00
goldsimon
bada7e0f92
mem.h: fixed constants to be unsinged to fix compiler warning
2014-11-07 16:01:19 +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
Sylvain Rochet
c2ebf5544b
fixed cosmetic bug #43499 : wrong argument order in src/include/netif/etharp.h defines
2014-10-29 18:56:33 +01:00
sg
d6fbe2a5ad
fixed bugs #41495 Possible threading issue in select() and #43278
...
event_callback() handle context switch when calling sys_sem_signal()
2014-10-28 22:28:50 +01:00
sg
b89e10c3e6
fixed comment (bug #43481 MEMP_SYS_TIMEOUTS is not for NO_SYS=0 only)
2014-10-28 21:26:49 +01:00
goldsimon
5a6c64cc28
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2014-10-21 11:09:30 +02:00
goldsimon
aecbce283d
fixed bug #38219 Assert on TCP netconn_write with sndtimeout set
2014-10-21 11:09:07 +02:00
Sylvain Rochet
60f920df0e
fixed bug #43235 , checking for non-existent preprocessor macros is non-standard, added predefinition for all affected macros
2014-10-12 20:51:58 +02:00
Sylvain Rochet
da19974e81
fixed bug #43235 , cleared compiler warnings when using gcc with -Wextra option
2014-10-12 19:54:43 +02:00
Simon Goldschmidt
ab9feb2e35
fixed bug #43173 , pppos_input() corrupts memory if IP_FORWARD is enabled
2014-10-12 18:23:10 +02:00
goldsimon
b8d798158b
fixed bug #43389 dns_recv() res_idx calculate error
2014-10-09 10:13:50 +02:00
Simon Goldschmidt
82d7c78b0c
Reverted typo fix for vj.c which is in the original sources: no need to add a diff only because of a typo...
2014-09-18 21:25:19 +02:00
Simon Goldschmidt
0074b7becb
More of patch #8397 Typos corrected in comments and text outputs
2014-09-18 21:23:19 +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
f71a590375
tabs -> spaces in opt.h (ppp-related)
2014-09-16 21:59:07 +02:00
Simon Goldschmidt
9f48488d87
minor: fixed coding style in pppapi.h/.c
2014-09-16 21:57:52 +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
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
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
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
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
08dd32d32d
PPP, most PPP headers are using u_long, u_int, u_short and u_char types, moved typedef of those types before we include any PPP header
2014-04-04 20:42:01 +02:00
Sylvain Rochet
b49584457a
Merge branch 'master' into ppp-new
2014-03-23 13:17:55 +01:00
goldsimon
40d25adb88
Added LWIP_HOOK_ETHARP_GET_GW to implement IPv4 routing with multiple gateways
2014-03-17 12:53:31 +01: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
c065427ebe
fixed bug #35928 BSD sockets functions must set errno for POSIX-compliance (patch by Mason)
2014-03-11 20:53:44 +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
c60635855d
fixed bug #38404 getpeeraddr returns success on unconnected/listening TCP sockets
2014-02-27 21:28:15 +01:00
Simon Goldschmidt
2666d6df90
fixed bug #41729 Some socket functions return Exyz instead of -1
2014-02-27 20:57:37 +01:00
Simon Goldschmidt
8558fa0bcf
etharp_entry::ctime must be u16_t after changing ARP_TMR_INTERVAL from 5 seconds to 1 second when fixing bug #34682
2014-02-26 21:51:56 +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
Simon Goldschmidt
fbdea8dc71
fixed bug #39076 ETHARP_STATS is not defined when LWIP_STATS is 0
2014-02-25 22:14:26 +01:00
Sylvain Rochet
58d0e8b28f
Merge branch 'master' into ppp-new
2014-02-24 20:21:47 +01:00
Simon Goldschmidt
07fbe82305
fixed bug #34681 Limit ARP queue length by ARP_QUEUE_LEN (=3)
2014-02-22 21:38:56 +01:00
Simon Goldschmidt
05a967564a
fixed bug #34682 Limit ARP request flood for unresolved entry
2014-02-22 21:23:06 +01:00
Sylvain Rochet
75ef1278e6
Merge branch 'master' into ppp-new
2014-02-21 20:37:10 +01:00
Simon Goldschmidt
fc158ad5c0
Fixed netconn_gethostbyname for LWIP_MPU_COMPATIBLE: removed invalid check on 'addr', copy 'name' since it could be located on the caller's stack
2014-02-21 09:04:39 +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
9572db262c
Fixed bug #39718 : disconnecting an UDP socket reports an error
2014-02-20 22:32:57 +01:00
Simon Goldschmidt
515e4b9187
fixed bug #39882 No function shall set errno to 0
2014-02-20 22:23:40 +01:00
Simon Goldschmidt
c1dc1a20d6
fixed bug #40050 SNMP problem with MIB arrays > 255
2014-02-20 22:14:10 +01:00
Simon Goldschmidt
a58083b11e
Fixed comment on LWIP_HAVE_LOOPIF
2014-02-20 22:09:38 +01:00
Simon Goldschmidt
0f24fba28a
IGMP: fixed !define LWIP_RAND case
2014-02-20 22:07:58 +01:00
Simon Goldschmidt
4d774e275d
netconn::recv_avail: forgot one line
2014-02-20 22:01:13 +01:00
Simon Goldschmidt
a2d6a50dff
fixed bug #41499 netconn::recv_avail can overflow
2014-02-20 21:55:11 +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
Erik Ekman
e432014a88
netif: Update header file documentation
...
IPv6 output method referenced old method name.
2014-02-20 21:22:39 +01:00
Simon Goldschmidt
a89db9872d
Added missing IPPROTO_RAW
2014-02-20 21:13:13 +01:00
Simon Goldschmidt
6dcc85dcf4
patch #7993 : Added support for transmitting packets with VLAN headers via hook function LWIP_HOOK_VLAN_SET and to check them via hook function LWIP_HOOK_VLAN_CHECK
2014-02-20 21:08:50 +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
cffe54d094
Patch #7815 by James Smith: added inet_ntop/inet_pton
2014-02-20 16:10:55 +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
ef6ec9de01
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2014-02-12 21:34:43 +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
Sylvain Rochet
a6b48d5273
normalize to LF (auto cleaned due to git attributes and must be commited before switching branch)
2014-02-09 16:34:47 +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
33086e6db0
patch #7920 thread-safe api dhcp calls for dhcp_infor, dhcp_renew and dhcp_release
2014-01-18 22:48:15 +01:00
Stathis Voukelatos
38bfe50508
Fixed size calculation in MALLOC memory pool creation macro.
...
The LWIP_MALLOC_MEMPOOL macro needs to use the aligned size of the
memp_malloc_helper structure, since mem_alloc() uses it to calculate
the required pool element size. If LWIP_MEM_ALIGN_SIZE(x) is redefined
to align to something larger than 4, then in some cases
the current code can lead to unexpected mem_alloc() failures.
For example:
#define LWIP_MEM_ALIGN_SIZE(size) (((size) + 31) & ~31)
and the largest MALLOC pool is of size 60 bytes, e.g.:
#define LWIP_MALLOC_MEMPOOL(256, 60)
then the following call:
mem_malloc(58)
will cause an assertion.
2014-01-18 22:40:16 +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
db472c73c1
patch #8021 Add INET[6]_ADDRSTRLEN Preprocessor Definitions If Not Previously Defined
2014-01-18 22:02:32 +01:00
Grant Erickson
29824f9baa
This patch addresses the following error when compiled against clang/LLVM 3.3 with -std=c++11:
...
error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
2014-01-18 21:44:44 +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
Grant Erickson
8ae472821f
autoip: add autoip_remove_struct
...
Added previously-missing autoip_remove_struct as a companion to
autoip_set_struct and to parallel dhcp_{set,remove}_struct.
2014-01-17 22:19:12 +01:00
Simon Goldschmidt
26911ff21c
patch #8160 (by Valery Ushakov): Simplify ip6_addr_set_solicitednode() and ip6_addr_cmp_solicitednode().
2014-01-17 22:05:54 +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
Simon Goldschmidt
8b63a89267
patch #7912 by Grant Erickson: Add a macro for introspecting the IPv6 loopback address.
2014-01-16 21:50:53 +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
Simon Goldschmidt
08370c7230
Patch #7904 by Grant Erickson: Add mnemonics for IPPROTO_{ICMP,ICMPV6}
2014-01-16 21:28:38 +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
Simon Goldschmidt
2cf5eec62f
patch by Thomas Faber: patch #8241 : Fix implicit declaration of ip_input with LWIP_TCPIP_CORE_LOCKING_INPUT disabled
2014-01-14 21:32:45 +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
357b28f675
PPP, fixed VJ compression/decompression output IP path
2014-01-14 18:20:18 +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
ae300c98a4
partially fixed bug #37585 : IPv6 compatibility (in socket structs)
2013-06-29 21:47:22 +02:00
Simon Goldschmidt
748b70311e
bug #37585/task #12600 : fixed struct in6_addr.s6_addr to conform to spec
2013-06-29 21:16:59 +02:00
Simon Goldschmidt
8d0664186a
- removed include instead of commenting it out;
...
- CHANGELOG should contain worthy entries only, a complete log of all source code changes can be found in git (I'm not saying this has always been observed, but I'd like to keep the list of changes as short as possible for anyone to read if interested)
2013-06-19 22:26:29 +02:00
Simon Goldschmidt
2fb5a71efd
patch #8030 : fixed spelling of "received"
2013-06-19 22:23:05 +02:00
Sylvain Rochet
4fda366b67
PPP, added PPP notify phase support
...
PPP notify phase support, using compile-time PPP_NOTIFY_PHASE macro.
This can be used for example to set a LED pattern depending on the
current phase of the PPP session.
Callback example:
static void ppp_notify_phase_cb(ppp_pcb *pcb, u8_t phase, void *ctx) {
switch(phase) {
case PPP_PHASE_DEAD: /* Kept off */
case PPP_PHASE_MASTER:
/* LED Off */
break;
case PPP_PHASE_INITIALIZE: /* Session opened */
/* LED FastBlink */
break;
case PPP_PHASE_RUNNING: /* Session running */
/* LED On */
break;
default:
/* LED SlowBlink */
}
}
2013-04-30 15:16:09 +02:00
Sylvain Rochet
2ceae6014e
PPP, reduced by one buffer PPPoS RX requirements in multithreaded context
...
Removed one unecessary allocated PBUF per PPPoS RX packet if PPP_INPROC_MULTITHREADED is set by adding the necessary data for
pppos_input_callback() in front of the first pbuf instead of allocating a new buffer.
2013-04-26 23:24:08 +02:00
Sylvain Rochet
cf3162cff1
PPP, moved PPP_INPROC_MULTITHREADED compile time option from ppp.h to opt.h
2013-04-26 21:55:30 +02:00
Sylvain Rochet
2350d941a5
PPP, added PPP_USE_PBUF_RAM compile time option
...
pbuf_type PPP is using for LCP, PAP, CHAP, EAP, IPCP and IP6CP packets.
Memory allocated must be single buffered for PPP to works, it requires pbuf
that are not going to be chained when allocated. This requires setting
PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems.
Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous
buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE.
2013-04-26 21:51:15 +02:00
Sylvain Rochet
25f9f55878
PPP, removed PPP_INPROC_OWNTHREAD feature, which almost only make things harder
...
I consider to remove the PPP_INPROC_OWNTHREAD crap in ppp-new,
as said in bugs #37278 and #37353 .
1. It requires the ppp_input_thread() function to be modified to match
user system, like some did by adding the vTaskDelete(NULL); FreeRTOS
call at the end of the function, for example.
This is a tiny-tiny fonction that should be, in my opinion, on the user
port, like the Ethernet input thread we see in many Ethernet port.
2. It is actually not that thread safe.
2.1. pcb->phase IS modified by the lwIP core thread so it should at
least be set to volatile, otherwise the pcb->phase copy may live
indefinitely in CPU register. It works because of the sio_read()
function call which without doubt flush pcb->phase copy from CPU
register. I dont want to set ppp_pcb struct to volatile for obvious
performance reasons.
2.2. This function assume PCB still exists whatever is happening, which
is not the case after you called ppp_delete() function outside of this
thread. If sio_read() is blocking waiting data and pcb destroyed, it is
going to read a deallocated pcb which luckily should still have
pcb->phase set to 0 (=PHASE_DEAD) due to preallocated "control block"
structures of lwIP. Even with sio_read_abort(), there might be timings
issue due to a lack of a synchronization mechanism.
3. I dislike the sys_msleep(1), it means that systems should have at
least a 11 chr buffer at 115200/10 byte/s, and bigger with higher serial
speed, for example with 3G/HSDPA modems accessed through SPI, at 20
Mbits/s this is a ~2000 bytes buffer required to keep incoming data
during this sleep, I don't see why we require systems to do so,
sio_read() should obviously be a blocking call. I cannot easily
remove this sleep because some systems might have wrongfully used this
call as a CPU idle feature with a non blocking sio_read() call.
2013-04-26 20:30:01 +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
549f97b54a
cleared compilation warning, C++ style comments are not allowed in ISO C90
2013-04-26 19:48:57 +02:00
Sylvain Rochet
f47a93b0c1
PPP, cleared compilation warning about unused variable 'pcb' in ppp_drop() if neither VJ nor SNMP support are enabled
2013-04-26 14:02:30 +02:00
Sylvain Rochet
3fe5a99dab
Merge branch 'master' into ppp-new
2013-04-25 00:36:12 +02:00
Simon Goldschmidt
097bc4c622
patch #8008 Fix a potential null pointer dereference in assert
2013-04-24 22:28:22 +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
a1555e0615
PPP, added ppp_free()
...
Free the control block, clean everything except the PPP PCB itself
and the netif, it allows you to change the underlying PPP protocol
(eg. from PPPoE to PPPoS to switch from DSL to GPRS) without losing
your PPP and netif handlers.
2013-04-23 00:19:07 +02:00
Sylvain Rochet
44b527415f
PPP, slight API change, great code factorisation
...
Created new ppp_over_X_create() functions which only prepare the PPP session without starting it
Removed ppp_reopen() and all of its sub ppp_over_X_reopen()
Removed PPPoL2TP reconnect() function, merged to connect()
Added ppp_open() able to start or restart any session
2013-04-22 23:58:51 +02:00
Sylvain Rochet
ed294c5945
PPP, removed ppposapi_input(), unnecessary because pppos_input() is already thread-safe
2013-04-22 21:21:04 +02:00
Sylvain Rochet
bd3ade31fa
PPP, added define for u_long, u_int, u_short, u_char for compilers or toolchains which don't have them
2013-04-22 21:16:02 +02:00
Sylvain Rochet
d03d2e6d3d
PPP, added ppp_addrs() macro to get the pointer of the ppp->addrs struct
2013-04-22 21:09:28 +02:00
Sylvain Rochet
58ffa8d526
PPP, free input pbuf left in ppp_delete()
2013-02-27 22:29:22 +01:00
Sylvain Rochet
bfe8c15a29
PPP, fixed return code coherency for ppp_netif_output_*() callbacks (using ERR_* as expected by lwIP core instead of PPPERR_*)
2013-02-22 11:52:44 +01:00
Sylvain Rochet
2fa7e003b1
PPP, fixed LCP delayed up feature
...
LCP is stealing a bit from fsm->flags struct member for LCP delayed up feature.
Bit stealed used to be the 9th bit (0x100) but fsm->flags was reduced to u8_t to save memory,
we are now stealing the 8th bit (0x80).
2013-01-31 15:36:30 +01:00
Sylvain Rochet
ba948669cd
Merge branch 'master' into ppp-new
2013-01-29 10:59:39 +01:00
goldsimon
666e84eef2
Improved/fixed comments about timeout.
2013-01-24 09:02:19 +01: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
b844129649
fixed bug #38097 pbuf_free_ooseq() warning
2013-01-15 21:07:01 +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
de1375201f
PPP, "try" variable used in LCP might conflict with some buggy C++ compiler
2013-01-04 23:08:11 +01:00
Sylvain Rochet
13ba8810c7
PPP, fixed one more IAR warnings
2013-01-04 22:51:13 +01:00
Sylvain Rochet
bdfbac2aa6
PPP, added missing semicolon (dammit)
2012-12-23 22:58:52 +01:00
Sylvain Rochet
6bd0bd2ed1
Merge branch 'master' into ppp-new
2012-12-23 22:56:51 +01:00
Sylvain Rochet
211a889528
PPP, fixed some IAR warnings
...
these are the compiler warnings I get with the head of ppp-new. All
of them are trivial, [...] (I'm using IAR EWARM 6.4).
ppp.c
Warning[Pe550]: variable "c" was set but never used
lwip\src\netif\ppp\ppp.c 1012
Warning[Pe111]: statement is unreachable
lwip\src\netif\ppp\ppp.c 1132
Warning[Pe111]: statement is unreachable
lwip\src\netif\ppp\ppp.c 1377
Warning[Pe111]: statement is unreachable
lwip\src\netif\ppp\ppp.c 1412
utils.c
Warning[Pe186]: pointless comparison of unsigned integer with zero
lwip\src\netif\ppp\utils.c 210
2012-12-23 22:52:58 +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
6751ac4970
PPP, moved FSM configuration to ppp_settings struct
2012-12-09 22:25:28 +01:00
Sylvain Rochet
6764957d06
PPP, moved EAP configuration to ppp_settings struct
2012-12-09 21:45:14 +01:00
Sylvain Rochet
c719ba7bf3
PPP, moved PAP configuration to ppp_settings struct
2012-12-09 21:22:19 +01:00
Sylvain Rochet
31d7293b17
PPP, moved EAP timeouts and max requests default values to opt.h
2012-12-09 20:40:41 +01:00
Sylvain Rochet
defef2222a
PPP, improved PAP and CHAP timeout/request/maxrequests configuration values
2012-12-09 20:24:22 +01:00
Sylvain Rochet
63459f65fb
PPP, moved DEFLOOPBACKFAIL from ppp/lcp.h to lwip/opt.h
2012-12-09 19:28:53 +01:00
Sylvain Rochet
c68e1ceb64
PPP, using timeouts values defined in opt.h instead of values defined in PPP headers or statically assigned values
2012-12-09 18:42:06 +01:00
Sylvain Rochet
07e72d2ac8
PPP, correctly cast int to u8_t in PPPCTLS_ERRCODE in ppp_ioctl()
2012-11-08 14:39:30 +01:00
Sylvain Rochet
7f97e354b4
PPP, switched chap_digests linked list to a const table in .rodata/flash, saving about 100 bytes in .data segment if chap(md5) and mschap is enabled
2012-10-14 02:04:36 +02:00
Sylvain Rochet
e5a554f0b5
PPP, adding const pragma to FSM callbacks, saving about 350 bytes in .data segment
2012-10-13 18:54:25 +02:00
Sylvain Rochet
9e4aa79278
PPP, adding const pragma to struct protent, saving about 200 bytes in .data segment
2012-10-13 18:38:18 +02:00
Sylvain Rochet
a0298728df
PPP, disable persist mode by default, so the default behavior does not look like a buggy behavior. Fixes bug #37279 .
2012-10-12 20:32:05 +02:00
Mark Lakata
0eb83f6ee6
PPP, IAR EWARM won't compile ppp-new due to keyword clash
...
The word "class" is reserved in IAR's EWARM compiler since it looks like c++.
This causes a failure to compile in the lcp code.
Arguably it is a bug in the compiler, but it is easy to work around with a
name change in the lcp.[ch] code. I fixed it by changing "class" to "class_".
2012-10-12 20:17:40 +02:00
Sylvain Rochet
e81f092520
PPP, changed all the code enclosed between PPP_SERVER #if macro to our PPP PCB structure, making it easier to support PPP server in the future
2012-09-27 23:53:20 +02:00
Sylvain Rochet
7fb874ad28
Merge branch 'master' into ppp-new
2012-09-27 21:32:27 +02:00
goldsimon
a4a41b9023
fixed bug #37405 'err_tcp()' uses already freed 'netconn' object
2012-09-26 21:50:42 +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
af56eebc6a
PPP, cleaned MTU,MRU variables
2012-09-01 19:44:43 +02:00
Sylvain Rochet
387c778496
PPP, added PPPoS reopen support
2012-09-01 19:29:17 +02:00
Sylvain Rochet
fbbde125d9
PPP, removed unnecessary ethif from ppp_pcb
2012-09-01 15:05:21 +02:00
Sylvain Rochet
dbaefd6126
PPP, cleaned persist and holdoff features
2012-09-01 14:43:31 +02:00
Sylvain Rochet
a1c87f7c49
PPP, improved fsm_sconfreq() allocated buffer size
2012-08-27 19:10:09 +02:00
Sylvain Rochet
045ee53468
PPP, using PBUF_POOL instead of PBUF_RAM pbufs for PPP negociation packets
...
PPP stack does not handle chained pbuf, but PPP negociation packets
are at most ~40 bytes long, so we are only checking if the payload
can fit into the allocated pbuf (p->tot_len == p->len).
2012-08-27 00:47:21 +02:00
Sylvain Rochet
b84ab718b0
PPP, ppp_input() code cleaning, removed dead code, fixed indentation
2012-08-25 20:38:54 +02:00
Sylvain Rochet
6144deb6b6
PPP, moved out PPPoS code into their own functions, improved ppp.c readability
2012-08-25 20:30:14 +02:00
Sylvain Rochet
19864a4a08
PPP L2TP, only skip HDLC header if necessary
...
RFC 2661 does not specify whether the PPP frame in the L2TP payload should
have a HDLC header or not. We handle both cases for compatibility.
2012-08-25 18:15:15 +02:00
Sylvain Rochet
7920b6e163
PPP, don't allocate twice struct eth_hdr per PPPoE pbuf
2012-08-25 16:21:58 +02:00
Sylvain Rochet
4928166593
Merge branch 'master' into ppp-new
2012-08-23 20:51:53 +02:00
Sylvain Rochet
ad5f520c68
PPP, updated pppapi_reopen() to follow ppp_reopen() prototype change
2012-08-23 20:47:14 +02:00
goldsimon
150b4fb4f6
fixed bug #37166 : memp_sanity check loops itself
2012-08-22 21:59:02 +02:00
Sylvain Rochet
076f177100
Added PPPd follow-up file, so that we can track what is happening on pppd.
...
The lwIP PPP support is based from pppd 2.4.5 (http://ppp.samba.org ) with
huge changes to match code size and memory requirements for embedded devices.
Anyway, pppd has a mature codebase for years and the average commit count
is getting low on their Git repositories, meaning that we can follow what
is happening on their side and merge what is relevant for lwIP.
So, here is the pppd follow up, so that we don't get away too far from pppd.
2012-08-22 17:40:23 +02:00
Sylvain Rochet
3b939480a4
PPP, added missing entry in pppapi.h
2012-08-22 11:41:07 +02:00
Sylvain Rochet
773a2767c7
PPP, added missing pppapi_delete() thread safe function
2012-08-21 20:26:37 +02:00
Sylvain Rochet
e9b29184d0
PPP, renamed all functions using common names in utils.c that can conflict with lwIP user code during link operation
2012-08-21 20:21:38 +02:00
Sylvain Rochet
0d02b8d1f6
added <stdlib.h> to ppp_impl.h, some PPP modules are using strtol()
2012-08-21 20:03:57 +02:00
Sylvain Rochet
98c0fcc659
Added <string.h> header to ppp_impl.h, this appears to be required, found out by Ivan Delamer.
2012-08-18 22:43:23 +02:00
Sylvain Rochet
1ddebcc862
Moved PPP headers into include/netif/ppp/, fixing bug #37040 .
2012-08-18 22:40:19 +02:00
Sylvain Rochet
1adb900561
Moved the include of lwip_md5.h or md5.h into the #if PPP_MD5_RANDM block, as suggested by Ivan Delamer
2012-08-18 12:56:59 +02:00
Sylvain Rochet
c5c1012ddd
removed some compiler warnings in pppoe_disconnect()
2012-08-17 23:42:14 +02:00
Sylvain Rochet
519f81771a
Merge remote-tracking branch 'origin/master' into ppp-new
2012-08-17 23:11:47 +02:00
Ivan Delamer
c762c06b17
Fixed typo in previous commit.
...
Change-Id: I97f85f4593509911829cfbbb6e309eecedd5465b
2012-08-17 11:24:18 -06:00
Ivan Delamer
8bab543531
Add a "NULL" output function for ipv6 by default, to avoid NULL
...
dereferencing in case of non-IPv6-enabled netifs (e.g. PPP).
Change-Id: I45f08ca89bfa0b8d61962f7052b11cc81a5e3cd1
2012-08-17 10:56:14 -06:00
goldsimon
bab8c82a35
fixed bug #36645 : Calling dhcp_release before dhcp_start dereferences NULL
2012-08-13 21:50:15 +02:00
goldsimon
b82bca7c99
fixed bug #36840 snmp_send_trap() NULL de-reference if traps configured but no interfaces available
2012-08-13 21:38:30 +02:00
goldsimon
556a2126b5
Fixed bug #36899 DNS TTL 0 is cached for a long time
2012-08-13 21:32:44 +02:00
goldsimon
a070751061
fixed bug #37052 : "netconn_alloc: undefined netconn_type" assertion skipped
2012-08-13 21:17:17 +02:00
goldsimon
847845027f
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2012-08-13 20:57:55 +02:00
goldsimon
c69914367d
Sanity-check the size of netif->hwaddr
2012-08-13 20:57:19 +02:00
Sylvain Rochet
48d364e269
Merge remote-tracking branch 'origin/master' into ppp-new
2012-07-24 23:17:15 +02:00
Sylvain Rochet
c58c27ed8b
removed time-based PPP phase state machine hacks from PPPoE dans PPPoL2TP
...
Our PPP phase state machine is now clean, we can safely remove time based
hacks in PPPoE dans PPPoL2TP.
2012-07-24 22:50:17 +02:00
James Smith
97b8abf16c
Fix bug #36857 : tcp_listen_dual_with_backlog() only works with ANY
...
address
Change-Id: I092a4c9978d88040214fc44a4c4b353be618d76c
2012-07-24 10:34:09 -06:00
Sylvain Rochet
59567b43b0
pcb->link_status_cb must be set, we don't need to check each time we use it if not NULL
2012-07-23 00:55:24 +02:00
Sylvain Rochet
e067e84d69
switch to phase dead if PPPoE or PPPoL2TP failed to connect
2012-07-23 00:48:27 +02:00
Sylvain Rochet
35c670513f
fixed some more PPP phase state machine issues
...
The only way PPPoE or PPPoL2TP disconnect it through ppp_link_terminated(),
therefore PPP is always already down, so we don't need to ask PPP to hup or stop.
2012-07-22 23:53:27 +02:00
Sylvain Rochet
8ec92b6fe7
don't call ppp_hup() and ppp_stop() if PPPoE or PPPoL2TP failed to connect
...
This is useless because PPP is not started yet, it confuses the PPP phase
state machine.
2012-07-22 23:37:35 +02:00
Sylvain Rochet
5552f082e8
handle cases when ppp_close() is called while session is in dead or holdoff phase
2012-07-22 21:42:56 +02:00
Sylvain Rochet
3c122117fc
improved PPP API, added ppp_reopen()
...
This is now the user choice to re-establish the session in the link status callback
by either calling the ppp_reopen() to re-establish or ppp_delete() to free the PPP
control block. Without user intervention, the PPP control block now stay in the dead
phase, allowing the user to re-establish or delete the control block later.
2012-07-22 20:53:54 +02:00
Sylvain Rochet
a467d21eba
ppp_close() PPPoL2TP support added
2012-07-22 18:05:19 +02:00
Sylvain Rochet
bc724ea206
Do not destroy the PPP control block automatically anymore, added ppp_delete() API function.
...
Without that, PPP user don't know when and how the PPP control block is free()ed, which
can lead to hard fault.
2012-07-22 17:20:40 +02:00
Sylvain Rochet
4ea5c1d973
improved persist mode, we now clear everything we can in the PPP control block structure, ensuring we start a new session from a clean state
2012-07-21 00:26:23 +02:00
Sylvain Rochet
c65883a727
UCHAR_MAX is defined in limits.h, I do not want to add any system include, replaced to 0xff
2012-07-16 20:09:49 +02:00
Sylvain Rochet
a4f6146667
removed some FIXME that are not relevant anymore
2012-07-15 15:57:54 +02:00
Sylvain Rochet
936c6c0d5c
reduced call stack by one when receiving a PPPoE disc packet
2012-07-15 15:12:40 +02:00
Sylvain Rochet
91af8878e1
saved some bytes from PPPoE control block, improved PADI retries
2012-07-15 15:07:07 +02:00
Sylvain Rochet
d2b2ae09e6
saving 14 bytes per PPPoE pbuf; not allocating struct eth_hdr two times per packet
2012-07-15 14:56:30 +02:00
Sylvain Rochet
94c35184a9
replaced PPPoL2TP printf() used to debug to PPPDEBUG a/o deletion
2012-07-14 17:47:30 +02:00
Sylvain Rochet
9e021cd1a8
improved PPP default interface management, added ppp_set_default() API call
2012-07-14 17:25:24 +02:00
Sylvain Rochet
78565026ac
L2TP output netif is now selectable, making it useful to select a default route for the L2TP tunnel, in case the default interface is set to the L2TP PPP interface
2012-07-12 01:11:08 +02:00
Sylvain Rochet
de6be743c6
added holdoff support for PPPoE and PPPoL2TP when persist mode is used
2012-07-11 23:50:33 +02:00
Sylvain Rochet
f534e80c71
added L2TPv2 (PPP over L2TP, a.k.a. UDP tunnels) support
...
Supported:
- L2TPv2 (PPP over L2TP, a.k.a. UDP tunnels)
- LAC
Not supported:
- LNS (require PPP server support)
- L2TPv3 ethernet pseudowires
- L2TPv3 VLAN pseudowire
- L2TPv3 PPP pseudowires
- L2TPv3 IP encapsulation
- L2TPv3 IP pseudowire
- L2TP tunnel switching - http://tools.ietf.org/html/draft-ietf-l2tpext-tunnel-switching-08
- Multiple tunnels per UDP socket, as well as multiple sessions per tunnel
- Hidden AVPs
2012-07-09 23:25:32 +02:00
Sylvain Rochet
0797ab6bc6
some buggy compiler get confused with duplicated labels used in enum tcp_state and fsm.h, prepending PPP's ones
2012-07-09 22:12:14 +02:00
Sylvain Rochet
b4df26a75d
some buggy compiler get confused with duplicated labels used in enum tcp_state and fsm.h, prepending PPP's ones
2012-07-09 22:04:09 +02:00
Sylvain Rochet
d92c462466
added PPP Sequential API module, based from the Network Interface Sequential API module
2012-07-07 19:50:56 +02:00
Sylvain Rochet
f31b905847
initialize PPP in the lwip_init() function
2012-07-07 17:33:34 +02:00
Sylvain Rochet
572e457e77
improved PPP API header documentation
2012-07-07 15:05:15 +02:00
Sylvain Rochet
be9b23a082
fixed LCP Echo Request/Reply feature
2012-07-07 12:16:48 +02:00
Sylvain Rochet
c9e7531251
Merge branch 'master' into ppp-new
2012-07-04 00:22:33 +02:00
Sylvain Rochet
90faecd86e
replaced u_int{8,16,32}_t to lwIP u{8,16,32}_t types
...
added padding to compiler generated bitfield, this is seen as best practice,
maybe it helps buggy compilers
2012-07-03 22:59:50 +02:00
Ivan Delamer
6c12e5bfbe
Allow setting/getting socket option IPV6_V6ONLY for stream sockets
...
only, as datagram sockets do not support dual IP versions yet.
Change-Id: I2d89bdaa06b19dc0c553c7be6ac6e9a71d3ce8a5
2012-07-03 14:39:25 -06:00
Sylvain Rochet
2e069429c2
removed bool type, replaced by u8_t
2012-07-03 22:03:51 +02:00
James Smith
e65202f825
Applied patch by James Smith to implement IPV6_V6ONLY support in
...
sockets and netconns.
Change-Id: I2ecd8e218703114890b2d678cc1ccf997a16f5e3
2012-07-03 13:16:04 -06:00
Erik Ekman
11a3057e8e
PPP: Add option to skip FCS table
...
Option PPP_FCS_TABLE is created which controls if PPPoS FCS calculation
should be done against precalculated table or by using a short algorithm.
Default value is 1, keeps old behaviour.
Setting it to 0 saves around 0.5 kB flash.
2012-06-23 15:11:49 +02:00
Sylvain Rochet
ba0c619844
clarified PPP_INPROC_OWNTHREAD documentation
2012-06-23 13:46:51 +02:00
Sylvain Rochet
a83fb30836
fixed PPPoS multithread support
2012-06-23 13:07:43 +02:00
Sylvain Rochet
dc092653f4
now displaying sent packet before PPPoS add its escaping, trailing flags, ...
2012-06-23 12:04:27 +02:00
Sylvain Rochet
25c6278000
fixed some endianess issues with PPPoS
2012-06-23 02:27:03 +02:00
Sylvain Rochet
5033e0e752
display IPV6CP packets
2012-06-23 01:44:52 +02:00
Sylvain Rochet
295eeef9b6
"ISO C forbids conversion of function pointer to object pointer type" - removed callback function pointer display in debug messages. Anyway, this is quite a meaningless information.
2012-06-22 21:48:21 +02:00
Sylvain Rochet
f63b87e28b
setting tot_len before using it, oops
2012-06-22 21:43:22 +02:00
Sylvain Rochet
1f780e86d5
PPP timeouts required depend on the number of allowed PPP sessions
...
Furthermore we need up to 6 timeouts per PPP (AUTH + PAP|CHAP|EAP + LCP + IPCP + IP6CP + PPPoE)
This can be improved with more conditions.
2012-06-22 21:29:12 +02:00
Sylvain Rochet
408a56ffaf
phase must be set to initalize each time we try to reconnect
2012-06-22 20:48:08 +02:00
Sylvain Rochet
a84f5d52ff
added ppp_pcb to ppp callback
2012-06-22 19:59:46 +02:00
Sylvain Rochet
fb6eed0087
set LL addresses before bringing the interface up for IPv6
2012-06-22 19:45:45 +02:00
Sylvain Rochet
dc242a01b4
don't build ppp_netif_output_ip6() if PPP IPV6 support is disabled
2012-06-22 19:29:55 +02:00
Sylvain Rochet
074d3dd2b1
moved ipv6cp global variables to ppp_pcb
2012-06-22 19:27:03 +02:00
Sylvain Rochet
807afbc879
improved FSM structure size
2012-06-22 18:50:09 +02:00
Sylvain Rochet
8f1eeb1025
improved ipv6cp_options struct size
2012-06-22 18:23:07 +02:00
Sylvain Rochet
dd288f70ec
fixed sent PPPoE dump packet and copy everything we need after pppoe_xmit() free'd the pbuf
2012-06-22 18:07:59 +02:00
Sylvain Rochet
6a11134a18
fixed PPPoS suppport compilation
2012-06-22 17:53:39 +02:00
Sylvain Rochet
9b60b55f03
SNMP prefers tot_len
2012-06-22 17:48:31 +02:00
Sylvain Rochet
77aa06df64
improved ppp_write_over_ethernet(), don't MEMCPY the entire packet into a new pbuf
2012-06-22 17:03:59 +02:00