lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] LWIP IPv4 does not accept broadcast packets when config


From: Indan Zupancic
Subject: Re: [lwip-devel] LWIP IPv4 does not accept broadcast packets when configured interface IP address is 0.0.0.0
Date: Fri, 23 Sep 2022 13:26:57 +0200
User-agent: Roundcube Webmail/1.3.16

Hello Andrei,

On 2022-09-22 19:23, Tutuianu, Andrei wrote:
I did some digging and I found out that the function
ip4_input_accept does not accept the packet because the
IP address of the interface is not valid (it checks if
the interface is up and the IP is not IPADDR_ANY). Is
the check for invalid address really necessary if the
IP packet is a broadcast?

You can define LWIP_IP_ACCEPT_UDP_PORT in lwipopt.h to add an exception:

#define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345))

Alternatively, have a non-zero default IP address for initial configuration.

Greetings,

Indan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]