Commit Graph

3607 Commits

Author SHA1 Message Date
Sylvain Rochet
e8399416ae PPP, magic, renamed random_bytes() to magic_random_bytes() for API coherency 2015-08-30 21:09:39 +02:00
Sylvain Rochet
d0fa8acf86 PPP, magic, enables building without PPP_MD5_RANDM support
The only API difference with and without the PPP_MD5_RANDM support is the
availability of the random_bytes() function. Added a random_bytes()
function on top of magic() when PPP_MD5_RANDM support is not enabled,
thus allowing builds for both cases.

PPP_MD5_RANDM is still enabled by default (it was mandatory) if a protocol
using encryption is enabled, such as CHAP, EAP, or L2TP auth support.
2015-08-30 21:09:39 +02:00
Sylvain Rochet
ced7bef274 PPP, magic, MD5 random pool size cannot be anything else than MD5 hash size, code cleaning to make it clear 2015-08-30 21:09:39 +02:00
Sylvain Rochet
311644f39b 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.
2015-08-30 21:09:38 +02:00
Sylvain Rochet
91e40e668c PPP, minor coding style fix 2015-08-30 21:09:38 +02:00
Sylvain Rochet
987f6237c4 PPP, MPPE, drop input/output packets if we couldn't find the chosen decompressor/compressor
Drop input/output packets if we couldn't find a decompressor/compressor,
it can't really happen because we only negotiate what we are able to
compress/decompress, but for the sake of code consistency it makes much
more sense to do so.
2015-08-30 21:09:38 +02:00
sg
b9a8310f4b fixed bug #44023: TCP ssthresh value is unclear: ssthresh is set to the full send window for active open, too, and is updated once after SYN to ensure the correct send window is used 2015-08-30 20:47:17 +02:00
Sylvain Rochet
ddba4b90c3 fixed typo: IP6_FRAG_COPYHEADER -> IPV6_FRAG_COPYHEADER 2015-08-28 14:28:04 +02:00
goldsimon
98f98048bc TCP window scaling: don't parse window scaling option on retransmission 2015-08-28 11:23:24 +02:00
goldsimon
367ac04ed8 Fixed UDP multicast receive filtering (multicast should only be received when bound to ANY or the destination multicast address) 2015-08-28 10:24:02 +02:00
goldsimon
43b18b20cc fixed bug #45818: API functions should check if type of ip_addr_t parameter matches the pcb type 2015-08-28 10:15:57 +02:00
goldsimon
06d8dba4a0 fixed bug #45559: Window scaling casts u32_t to u16_t without checks 2015-08-28 09:23:10 +02:00
Sylvain Rochet
b79c3aadd2 PPP, MPPE, improve dropping of unencrypted received packet
Improve dropping of unencrypted received packet by taking into account
all other data protocols (such as VJ packets) in a generic way.
2015-08-28 00:19:32 +02:00
Sylvain Rochet
46985bf750 PPP, explain better why we don't need protp->datainput callback 2015-08-27 22:42:42 +02:00
Sylvain Rochet
36b3878a45 PPP, PPPoS, fixed copy/paste typo in pppos_send_config() out accm debug message 2015-08-27 22:24:27 +02:00
sg
bc8120c864 Add another sanity check for bug #41009 2015-08-27 21:43:42 +02:00
sg
8b6d9d8216 Fixed UPGRADING regarding 1.4.0 2015-08-27 21:38:30 +02:00
sg
413bf85dde Remove empty init functions where not required for backwards compatibility 2015-08-27 21:35:18 +02:00
Sylvain Rochet
97ef85c9aa PPP, MPPE, fixed TCP over MPPE
We used to modify in place the packet payload during encryption, it works
well for UDP and ICMP but TCP stack requires that we don't change the
packet payload, therefore we now copy the whole packet before encryption.
2015-08-27 01:58:35 +02:00
sg
f649172580 fixed bug bug #41009: IPv6 reassembly broken on 64-bit platforms: define IPV6_FRAG_COPYHEADER==1 on these platforms to copy the IPv6 header instead of referencing it, which gives more room for struct ip6_reass_helper 2015-08-26 22:16:23 +02:00
sg
aad76acb68 IPV6_REASS: fix ip6_reass_remove_oldest_datagram() when the first fragment to enqueue has more pbufs than IP_REASS_MAX_PBUFS 2015-08-26 21:20:13 +02:00
sg
5eb1c411a5 LWIP_LOOPIF_MCAST -> LWIP_LOOPIF_MULTICAST 2015-08-26 20:55:51 +02:00
sg
0d6001a196 fix comment indentation 2015-08-26 20:29:38 +02:00
Joel Cunningham
0ab21da820 Add multicast support to loopif
This commit adds support to send and receive multicast on the loopback
netif by enabling IGMP via NETIF_FLAG_IGMP

This commit also introduces an LwIP configuration option,
LWIP_LOOPIF_MCAST, to control the behavior and it defaults to off
2015-08-26 20:28:03 +02:00
sg
204bd29e52 fixed bug #45827: recvfrom: TCP window is updated with MSG_PEEK 2015-08-25 22:25:51 +02:00
goldsimon
fd8b37dc14 fixed bug #45029 (Several macros use ip6_2_ip() without supplying a storage address): removed netconn_*_ip6() macros 2015-08-25 07:33:24 +02:00
sg
94550682d7 more cleanup prework to fix bug #45029 2015-08-24 22:46:34 +02:00
sg
7754f96549 Change IP6_ADDR/IP_ADDR6 to initialize a full IPv6 address (e.g. use with PP_HTONL) - renamed old IP6_ADDR() to IP6_ADDR_PART() 2015-08-24 20:30:48 +02:00
goldsimon
ee2d01ed88 fix compiler warnings when passing u16_t to pbuf_header() 2015-08-24 08:49:51 +02:00
goldsimon
e97f9fca22 netdb: fix debug output when IPv6 is enabled 2015-08-24 08:02:23 +02:00
sg
177c06b1f1 - prework for fixing bug #45029: access IPv4 configuration of struct netif via new API (netif_ip4_addr()/netif_ip4_netmask()/netif_ip4_gw()) instead of accessing the struct member directly. This way, we can change the struct member types from ip4_addr_t to ip_addr_t;
- fixed some bugs in calls to ip4_addr*() where the cast to u8_t* did not reveal the wrong address type
2015-08-20 22:39:48 +02:00
goldsimon
cc348dcca2 LWIP_IGMP and LWIP_MULTICAST_TX_OPTIONS need LWIP_IPV4 2015-08-20 16:36:54 +02:00
goldsimon
8622af77c1 nd6: adapt to constness of IP6_ADDR_ANY6 for IPv6-only configuration 2015-08-20 16:35:49 +02:00
goldsimon
3b21f469ca fix bug #45120 in a cleaner way 2015-08-20 13:05:59 +02:00
goldsimon
82033d5029 Clarify comment for MEMP_NUM_SNMP_VARBIND/MEMP_NUM_SNMP_VALUE 2015-08-20 11:43:36 +02:00
goldsimon
da5ccbf7d1 SNMP: tiny preparation for SNMP to support more versions than just v1: store request version in struct snmp_msg_pstat so that the response can be sent with the same version (v2c might already work but getbulk is missing) 2015-08-20 09:38:17 +02:00
goldsimon
a22a92b481 Fixed compiler warning when window scaling is enabled (tcp_sndbuf() should still return u16_t since that value can directly be passed to tcp_write()) 2015-08-20 09:18:20 +02:00
goldsimon
5bd262f9e9 fixed passing u16_t 'snmp_varbind->value_len' to functions taking an u8_t only 2015-08-20 08:23:34 +02:00
goldsimon
2b93ef1d75 fixed bug #43790: Sending octet string of Length >255 from SNMP agent (patch by Manoj Kumar) 2015-08-20 08:12:50 +02:00
sg
05abfc8ded Fixed icmp.c after 1.4.0-based patch #45120 2015-08-19 22:14:37 +02:00
sg
de8e810792 fixed bug #45120: Broadcast & multiple interfaces handling 2015-08-19 20:55:03 +02:00
goldsimon
cb28380f47 Add doxygen config + main-file used by Frédéric to create http://www.nongnu.org/lwip/ for 1.3.0 (see https://lists.gnu.org/archive/html/lwip-users/2013-01/msg00062.html) - just so that it doesn't get lost 2015-08-19 15:43:46 +02:00
goldsimon
d104335501 dns.c: fixed compiler warning 2015-08-19 13:28:03 +02:00
goldsimon
7263cc675b fixed bug #45004: dns response without answer might be discarded 2015-08-19 10:33:42 +02:00
Joel Cunningham
d850efdd08 IPv6 sockaddr clean ups
This commit address two issues with sockaddr struct implementations for
IPv6:

  1) struct sockaddr_in6 should have 32-bit unsigned field sin6_scope_id
     as specified in Section 3.4 of RFC 3493 (Basic Socket Interface
	 Extensions for IPv6)
  2) struct sockaddr is not extended in IPv6 to contain space for
     struct sockaddr_in6.  Applications should be using struct
	 sockaddr_storage when needing generic storage.  This removes the
	 extra bytes added when LWIP_IPV6 is defined
2015-08-19 10:15:47 +02:00
goldsimon
a6bd0944db LWIP_NETCONN_SEM_PER_THREAD: ensure sys_sem_valid() is only called for non-NULL pointers (not all ports might check this) 2015-08-19 09:57:59 +02:00
goldsimon
7df2dd67bd another fix for LWIP_MULTICAST_TX_OPTIONS: without LWIP_IGMP, udp_pcb->mcast_ttl was not initialized 2015-08-19 09:19:08 +02:00
goldsimon
5be95aa377 accidentally committed debug comment // 2015-08-19 08:36:54 +02:00
sg
c2f978bd1e patch by Chrysn: patch #8704 fix sys_timeouts_sleeptime function 2015-08-18 21:38:08 +02:00
sg
21815a1427 dns: fixed assertion when dns server address is set to ANY (patch #8692) 2015-08-18 21:30:46 +02:00