[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #9165] Allowing udp src port to be 0 in cases when w
From: |
Sylvain Rochet |
Subject: |
[lwip-devel] [patch #9165] Allowing udp src port to be 0 in cases when we don't care about outgoing port |
Date: |
Tue, 22 Nov 2016 21:01:36 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #7, patch #9165 (project lwip):
> As I stated before, it is impossible to connect a pcb to an ip address
> without knowing the senders outgoing port.
Receiving without knowing the sender outgoing port is the udp_bind() behavior.
What you need is a filter on source IP address which can currently only be
done in your udp_recv callback.
udp_connect(pcb, &cb, 0); means for me that you want to connect/send a packet
to a random remote port, it does not make sense indeed but a 0 port is special
and is globally known as "chose for me" and never as "don't filter input
packet on source port".
What you could ask is a udp_filter_source_ip() function but it will then never
be available for the Socket APIā¦
Sylvain
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?9165>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/