Collision in PBUF_RAM
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
Hello,
i don't understand a part of the code when ppp wants check the peer's
requested CIs and send appropriate response.
In function "lcp_reqci()" of "lcp.c".
I don't understand the condition:
u_char *p; /* Pointer to next char to parse */
[...]
if (l < 2 || /* Not enough data for CI header or */
p[1] < 2 || /* CI length too small or */
p[1] > l) { /* CI length too big? */
the pointer *p is not initialized previously. So, ppp send a config
reject to the modem and never check the incoming config info.
Is this check important? Can i remove it? Is there an init to do (
memset, malloc)?
During my debug:
l=0x18
p: can't acess to memory
--
--
Nicolas Dioli
Etudiant ingénieur
AXUN SAS
Tél : +33 (0)6 78 18 53 12
Nicolas Dioli wrote:
> Hello,
> i don't understand a part of the code when ppp wants check the peer's
> requested CIs and send appropriate response.
> In function "lcp_reqci()" of "lcp.c".
> I don't understand the condition:
>
> u_char *p; /* Pointer to next char to parse */
> [...]
> if (l < 2 || /* Not enough data for CI header or */
> p[1] < 2 || /* CI length too small or */
> p[1] > l) { /* CI length too big? */
>
> the pointer *p is not initialized previously. So, ppp send a config
> reject to the modem and never check the incoming config info.
> Is this check important? Can i remove it? Is there an init to do (
> memset, malloc)?
>
> During my debug:
> l=0x18
> p: can't acess to memory
Can't help you there. Our PPP code is taken from the "original" open source ppp (http://ppp.samba.org/),
version 2.3.11 plus some backported bugfixes from later versions. You could take a look at lcp.c of the
current version of that distribution (2.4.5, I think), to see if the code is the same there. If so, you could
ask them for help. If not, we can change our code to what they did.
Simon
--
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Hello,
i don't understand a part of the code when ppp wants check the peer's requested CIs and send appropriate response.
In function "lcp_reqci()" of "lcp.c".
I don't understand the condition:
u_char *p; /* Pointer to next char to parse */
[...]
if (l < 2 || /* Not enough data for CI header or */
p[1] < 2 || /* CI length too small or */
p[1] > l) { /* CI length too big? */
the pointer *p is not initialized previously. So, ppp send a config reject to the modem and never check the incoming config info.
Is this check important? Can i remove it? Is there an init to do ( memset, malloc)?
During my debug:
l=0x18
p: can't acess to memory
Ce message entrant est certifié sans virus connu. Analyse effectuée par AVG - www.avg.fr Version: 9.0.791 / Base de données virale: 271.1.1/2782 - Date: 03/31/10 20:32:00
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
Hello,
I do not understand, or there is a problem, with the semantic of void sys_mbox_post(sys_mbox_t mbox, void *msg).
sys_mbox_post(…) is called by, among several places,
err_t
tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg)
{
struct tcpip_msg *msg;
if (mbox != SYS_MBOX_NULL) {
msg = memp_malloc(MEMP_TCPIP_MSG_API);
if (msg == NULL) {
return ERR_MEM;
}
msg->type = TCPIP_MSG_TIMEOUT;
msg->msg.tmo.msecs = msecs;
msg->msg.tmo.h = h;
msg->msg.tmo.arg = arg;
sys_mbox_post(mbox, msg);
return ERR_OK;
}
return ERR_VAL;
}
and
err_t
tcpip_apimsg(struct api_msg *apimsg)
{
struct tcpip_msg msg;
if (mbox != SYS_MBOX_NULL) {
msg.type = TCPIP_MSG_API;
msg.msg.apimsg = apimsg;
sys_mbox_post(mbox, &msg);
sys_arch_sem_wait(apimsg->msg.conn->op_completed, 0);
return ERR_OK;
}
return ERR_VAL;
}
Please note that the latter is passing a TCPIP_msg instance on the stack, which need therefore to be copied before being queued.
The first instead is allocating the message, which therefore does not need to be copied.
Which semantic is the right one and exactly what are the requirements on the implementor of sys_mbox_post(…)?
Regards
L.
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
The above line waits until the message is processed, therefore allocation on the stack is OK.err_ttcpip_apimsg(struct api_msg *apimsg)
{
struct tcpip_msg msg;
if (mbox != SYS_MBOX_NULL) {
msg.type = TCPIP_MSG_API;
msg.msg.apimsg = apimsg;
sys_mbox_post(mbox, &msg);
sys_arch_sem_wait(apimsg->msg.conn->op_completed, 0);
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
Hello everybody, i´m using lwip in AVR32 in EVK1100.
I´m sending a big packet ( 15 Mbytes) , and the time to finish the process is very high!!. In the sniffer (wireshark) i saw that the packet is divided in two size 1400 and 690 i don´t remenber exactly, but this order the size.
How can i increse the speed of transmission? should i change the file of configure lwipopt.h? what value are typical to send very fast?
thanks in advance
Regards
Oscar
--
"En la vida hay tres cosas que nunca dan marcha atras, la palabra pronunciada, la flecha lanzada y la oportunidad perdida"
_______________________________________________ lwip-users mailing list lwip-users@... http://lists.nongnu.org/mailman/listinfo/lwip-users
RSS Feed37 | |
|---|---|
60 | |
71 | |
85 | |
111 | |
98 | |
73 | |
48 | |
97 | |
184 | |
137 | |
186 | |
197 | |
54 | |
125 | |
157 | |
123 | |
86 | |
173 | |
130 | |
275 | |
169 | |
149 | |
110 | |
171 | |
184 | |
163 | |
80 | |
49 | |
105 | |
151 | |
173 | |
105 | |
120 | |
102 | |
111 | |
139 | |
152 | |
231 | |
230 | |
175 | |
91 | |
108 | |
213 | |
232 | |
241 | |
271 | |
178 | |
134 | |
171 | |
214 | |
162 | |
119 | |
138 | |
155 | |
159 | |
128 | |
177 | |
107 | |
47 | |
162 | |
126 | |
185 | |
170 | |
234 | |
138 | |
168 | |
147 | |
177 | |
70 | |
126 | |
155 | |
189 | |
133 | |
239 | |
164 | |
55 | |
52 | |
62 | |
167 | |
142 | |
91 | |
82 | |
54 | |
71 | |
95 | |
98 | |
40 | |
60 | |
77 | |
92 | |
49 | |
45 | |
73 | |
48 | |
70 | |
41 | |
37 | |
41 | |
70 | |
86 | |
109 | |
113 | |
105 | |
126 | |
91 | |
125 | |
109 | |
44 | |
1 | |
1 |