[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-members] new udp.c issue / sharing of UDP port between broadc
From: |
Jani Monoses |
Subject: |
Re: [lwip-members] new udp.c issue / sharing of UDP port between broadcast listeners |
Date: |
Fri, 14 Feb 2003 17:32:44 +0200 |
Ok Leon go ahead
I think I also found something in udp_bind
it seems that a pcb can't be rebound if
it keeps the port but changes the address(not too frequent but still)
so I put a continue so pcb does not compare with itself instead
it goes to the next in thelist
because after rebind is set to 1 the following
if (pcb == ipcb) {
rebind = 1;
continue; <<HERE
}
/* port matches that of PCB in list? */
if ((ipcb->local_port == port) &&
/* IP address matches, or one is IP_ADDR_ANY? */
(ip_addr_isany(&(ipcb->local_ip)) ||
ip_addr_isany(ipaddr) ||
ip_addr_cmp(&(ipcb->local_ip), ipaddr))) {
> Hello,
>
> found another issue in recent udp.c:
>
> udp_bind(struct udp_pcb *pcb, struct ip_addr *ipaddr, u16_t port)
>
> does no longer allow two PCB's to share a local port.
>
> This is what we use to mimick SO_REUSEADDR behaviour where
> multiple UDP ports are allowed to listen to the same broadcast
> traffic on a certain UDP port. This is allowed under *BSD/Unix/Linux
> type sockets.
>
> As said earlier, I will revert the changes made to udp.c by simply
> disabling the new code using #if 0 constructs. This will probably
> break some issues in the netcon_ layer once I commit.
>
> But I rather choose the lower layer to break the upper, then vice
> versa. (The lower layers must not restrict functionality needed by
> upper layers.)
>
> Regards,
>
> Leon.
>
>
>
> _______________________________________________
> lwip-members mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-members