mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +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:
|
||||
|
||||
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:
|
||||
* etharp.h/.c: Fixed broken VLAN support.
|
||||
|
||||
|
@ -611,8 +611,10 @@ tcp_new_port(void)
|
||||
int i;
|
||||
struct tcp_pcb *pcb;
|
||||
#ifndef TCP_LOCAL_PORT_RANGE_START
|
||||
#define TCP_LOCAL_PORT_RANGE_START 4096
|
||||
#define TCP_LOCAL_PORT_RANGE_END 0x7fff
|
||||
/* From http://www.iana.org/assignments/port-numbers:
|
||||
"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
|
||||
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? */
|
||||
if (port == 0) {
|
||||
#ifndef UDP_LOCAL_PORT_RANGE_START
|
||||
#define UDP_LOCAL_PORT_RANGE_START 4096
|
||||
#define UDP_LOCAL_PORT_RANGE_END 0x7fff
|
||||
/* From http://www.iana.org/assignments/port-numbers:
|
||||
"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
|
||||
port = UDP_LOCAL_PORT_RANGE_START;
|
||||
ipcb = udp_pcbs;
|
||||
|
Loading…
Reference in New Issue
Block a user