support udp_broadcast_new also when using IPv6. Suggested by Wolf-Bastian Pttner.
This commit is contained in:
parent
d86ee2c665
commit
9765df97e5
|
@ -29,7 +29,7 @@
|
|||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
*
|
||||
* $Id: tcpip.c,v 1.20 2009/04/06 13:18:12 nvt-se Exp $
|
||||
* $Id: tcpip.c,v 1.21 2009/04/13 19:54:07 nvt-se Exp $
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
|
@ -307,8 +307,12 @@ udp_broadcast_new(u16_t port, void *appstate)
|
|||
{
|
||||
uip_ipaddr_t addr;
|
||||
struct uip_udp_conn *conn;
|
||||
|
||||
|
||||
#if UIP_CONF_IPV6
|
||||
uip_create_linklocal_allnodes_mcast(&addr);
|
||||
#else
|
||||
uip_ipaddr(&addr, 255,255,255,255);
|
||||
#endif /* UIP_CONF_IPV6 */
|
||||
conn = udp_new(&addr, port, appstate);
|
||||
if(conn != NULL) {
|
||||
udp_bind(conn, port);
|
||||
|
|
Loading…
Reference in a new issue