mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 12:24:22 +00:00
Fixed bug #33048 (Bad range for IP source port numbers) by using ports in the IANA private/dynamic range (49152 through 65535).
This commit is contained in:
parent
791505ab6e
commit
33d6dcec5b
@ -237,6 +237,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2011-04-13: Simon Goldschmidt
|
||||||
|
* tcp.c, udp.c: Fixed bug #33048 (Bad range for IP source port numbers) by
|
||||||
|
using ports in the IANA private/dynamic range (49152 through 65535).
|
||||||
|
|
||||||
2011-03-29: Simon Goldschmidt, patch by Emil Lhungdahl:
|
2011-03-29: Simon Goldschmidt, patch by Emil Lhungdahl:
|
||||||
* etharp.h/.c: Fixed broken VLAN support.
|
* etharp.h/.c: Fixed broken VLAN support.
|
||||||
|
|
||||||
|
@ -611,8 +611,10 @@ tcp_new_port(void)
|
|||||||
int i;
|
int i;
|
||||||
struct tcp_pcb *pcb;
|
struct tcp_pcb *pcb;
|
||||||
#ifndef TCP_LOCAL_PORT_RANGE_START
|
#ifndef TCP_LOCAL_PORT_RANGE_START
|
||||||
#define TCP_LOCAL_PORT_RANGE_START 4096
|
/* From http://www.iana.org/assignments/port-numbers:
|
||||||
#define TCP_LOCAL_PORT_RANGE_END 0x7fff
|
"The Dynamic and/or Private Ports are those from 49152 through 65535" */
|
||||||
|
#define TCP_LOCAL_PORT_RANGE_START 0xc000
|
||||||
|
#define TCP_LOCAL_PORT_RANGE_END 0xffff
|
||||||
#endif
|
#endif
|
||||||
static u16_t port = TCP_LOCAL_PORT_RANGE_START;
|
static u16_t port = TCP_LOCAL_PORT_RANGE_START;
|
||||||
|
|
||||||
|
@ -746,8 +746,10 @@ udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port)
|
|||||||
/* no port specified? */
|
/* no port specified? */
|
||||||
if (port == 0) {
|
if (port == 0) {
|
||||||
#ifndef UDP_LOCAL_PORT_RANGE_START
|
#ifndef UDP_LOCAL_PORT_RANGE_START
|
||||||
#define UDP_LOCAL_PORT_RANGE_START 4096
|
/* From http://www.iana.org/assignments/port-numbers:
|
||||||
#define UDP_LOCAL_PORT_RANGE_END 0x7fff
|
"The Dynamic and/or Private Ports are those from 49152 through 65535" */
|
||||||
|
#define UDP_LOCAL_PORT_RANGE_START 0xc000
|
||||||
|
#define UDP_LOCAL_PORT_RANGE_END 0xffff
|
||||||
#endif
|
#endif
|
||||||
port = UDP_LOCAL_PORT_RANGE_START;
|
port = UDP_LOCAL_PORT_RANGE_START;
|
||||||
ipcb = udp_pcbs;
|
ipcb = udp_pcbs;
|
||||||
|
Loading…
Reference in New Issue
Block a user