[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: Issue with udp_input() and source ports
From: |
Jakob Stoklund Olesen |
Subject: |
[lwip-users] Re: Issue with udp_input() and source ports |
Date: |
Mon, 10 Aug 2009 13:03:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
Kieran Mansley <address@hidden> writes:
> On Thu, 2009-08-06 at 15:36 -0700, Brian Lam wrote:
>> I looked into udp.c and saw that udp_input() checks both the source and
>> destination port of connected pcbs before it considers it a match(line
>> 195, rev 1.109). I think that this may be in violation of RFC 768 which
>> states that:
>>
>> "Source Port is an optional field, when meaningful, it indicates the port
>> of the sending process, and may be assumed to be the port to which a
>> reply should be addressed in the absence of any other information. If
>> not used, a value of zero is inserted."
>
> Could you file a bug for this on savannah?
On the other hand, from Linux "man 2 connect":
If the socket sockfd is of type SOCK_DGRAM then addr is the address to
which datagrams are sent by default, and the only address from which
datagrams are received. If the socket is of type SOCK_STREAM or
SOCK_SEQ‐ PACKET, this call attempts to make a connection to the
socket that is bound to the address specified by addr.
If you want to receive UDP from anybody, don't call connect().
/jakob