From e29f94a98094e4fb538f5770e1fea10827d2eeaa Mon Sep 17 00:00:00 2001 From: fbernon Date: Mon, 4 May 2009 08:40:44 +0000 Subject: [PATCH] dhcp.c, netbios.c: Changes if IF_SOF_BROADCAST is enabled. --- CHANGELOG | 5 ++++- src/core/dhcp.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 246972c7..cce5468e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -33,7 +33,7 @@ HISTORY 2009-04-15 Simon Goldschmidt * dhcp.c: patch #6763: Global DHCP XID can be redefined to something more unique - +˛ 2009-03-31 Kieran Mansley * tcp.c, tcp_out.c, tcp_in.c, sys.h, tcp.h, opts.h: add support for TCP timestamp options, off by default. Rework tcp_enqueue() to @@ -95,6 +95,9 @@ HISTORY ++ Bugfixes: + 2009-05-04 Frédéric Bernon + * dhcp.c, netbios.c: Changes if IF_SOF_BROADCAST is enabled. + 2009-05-03 Simon Goldschmidt * tcp.h: bug #26349: Nagle algorithm doesn't send although segment is full (and unsent->next == NULL) diff --git a/src/core/dhcp.c b/src/core/dhcp.c index 64a1205f..2f346a34 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -619,6 +619,9 @@ dhcp_start(struct netif *netif) netif->dhcp = dhcp = NULL; return ERR_MEM; } +#if IP_SOF_BROADCAST + dhcp->pcb->so_options|=SOF_BROADCAST; +#endif /* IP_SOF_BROADCAST */ /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); @@ -681,6 +684,9 @@ dhcp_inform(struct netif *netif) pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); +#if IP_SOF_BROADCAST + dhcp->pcb->so_options|=SOF_BROADCAST; +#endif /* IP_SOF_BROADCAST */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); udp_connect(dhcp->pcb, IP_ADDR_BROADCAST, DHCP_SERVER_PORT); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_inform: INFORMING\n"));