mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 09:19:53 +00:00
PPP, PPPoS, remove magic_randomize() from PPPoS, it is already called in ppp_input()
There is no point of calling magic_randomize() for each pppos_input() call, making magic_randomize() potentially called for each serial input byte which is quite a bad idea since magic_randomize() is quite intensive in processing time (MD5 computation) compared to HDLC frame parsing. There is no entropy added when being called for each input byte rather than for each valid input packet because byte input is a monotonic event at the packet level. Well, if packet arrival time is a valid entropy source even so, which I doubt a lot, but we don't really have anything else and we really need random for PPP authentication layers.
This commit is contained in:
parent
91e40e668c
commit
311644f39b
@ -49,7 +49,6 @@
|
||||
|
||||
#include "netif/ppp/ppp_impl.h"
|
||||
#include "netif/ppp/pppos.h"
|
||||
#include "netif/ppp/magic.h"
|
||||
#include "netif/ppp/vj.h"
|
||||
|
||||
/* callbacks called from PPP core */
|
||||
@ -716,8 +715,6 @@ pppos_input(ppp_pcb *ppp, u8_t *s, int l)
|
||||
pppos->in_fcs = PPP_FCS(pppos->in_fcs, cur_char);
|
||||
}
|
||||
} /* while (l-- > 0), all bytes processed */
|
||||
|
||||
magic_randomize();
|
||||
}
|
||||
|
||||
#if PPP_INPROC_IRQ_SAFE
|
||||
|
Loading…
Reference in New Issue
Block a user