Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
95e85c74
Commit
95e85c74
authored
Aug 20, 2016
by
Marcel Stör
Committed by
GitHub
Aug 20, 2016
Browse files
Revert "with this small fix, the DNS engine is RFC 5452 compliant because it …" (#1465)
parent
6e25b747
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/include/lwip/udp.h
View file @
95e85c74
...
@@ -156,11 +156,6 @@ void udp_input (struct pbuf *p, struct netif *inp)ICACHE_FLASH_
...
@@ -156,11 +156,6 @@ void udp_input (struct pbuf *p, struct netif *inp)ICACHE_FLASH_
#define udp_init()
/* Compatibility define, not init needed. */
#define udp_init()
/* Compatibility define, not init needed. */
#ifndef UDP_LOCAL_PORT_RANGE_START
#define UDP_LOCAL_PORT_RANGE_START 4096
#define UDP_LOCAL_PORT_RANGE_END 0x7fff
#endif
#if UDP_DEBUG
#if UDP_DEBUG
void
udp_debug_print
(
struct
udp_hdr
*
udphdr
)
ICACHE_FLASH_ATTR
;
void
udp_debug_print
(
struct
udp_hdr
*
udphdr
)
ICACHE_FLASH_ATTR
;
#else
#else
...
...
app/lwip/core/dns.c
View file @
95e85c74
...
@@ -254,14 +254,8 @@ dns_init()
...
@@ -254,14 +254,8 @@ dns_init()
LWIP_ASSERT
(
"For implicit initialization to work, DNS_STATE_UNUSED needs to be 0"
,
LWIP_ASSERT
(
"For implicit initialization to work, DNS_STATE_UNUSED needs to be 0"
,
DNS_STATE_UNUSED
==
0
);
DNS_STATE_UNUSED
==
0
);
/* initialize DNS client, try to get RFC 5452 random source port */
/* initialize DNS client */
u16_t
port
=
UDP_LOCAL_PORT_RANGE_START
+
(
os_random
()
%
(
UDP_LOCAL_PORT_RANGE_END
-
UDP_LOCAL_PORT_RANGE_START
));
udp_bind
(
dns_pcb
,
IP_ADDR_ANY
,
0
);
for
(;;)
{
if
(
udp_bind
(
dns_pcb
,
IP_ADDR_ANY
,
port
)
==
ERR_OK
)
break
;
LWIP_ASSERT
(
"Unable to get a PCB for DNS"
,
port
!=
0
);
port
=
0
;
// try again with random source
}
udp_recv
(
dns_pcb
,
dns_recv
,
NULL
);
udp_recv
(
dns_pcb
,
dns_recv
,
NULL
);
/* initialize default DNS primary server */
/* initialize default DNS primary server */
...
...
app/lwip/core/udp.c
View file @
95e85c74
...
@@ -758,6 +758,10 @@ udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port)
...
@@ -758,6 +758,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
#define UDP_LOCAL_PORT_RANGE_START 4096
#define UDP_LOCAL_PORT_RANGE_END 0x7fff
#endif
port
=
UDP_LOCAL_PORT_RANGE_START
;
port
=
UDP_LOCAL_PORT_RANGE_START
;
ipcb
=
udp_pcbs
;
ipcb
=
udp_pcbs
;
while
((
ipcb
!=
NULL
)
&&
(
port
!=
UDP_LOCAL_PORT_RANGE_END
))
{
while
((
ipcb
!=
NULL
)
&&
(
port
!=
UDP_LOCAL_PORT_RANGE_END
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment