mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Populate the wildcard interface IP list with the IPs of each enabled interface
rather than 0.0.0.0/0.0.0.0 as the behaviour of broadcasting to 255.255.255.255 is unreliable.
This commit is contained in:
parent
fab32bf974
commit
3c42e513ed
@ -125,29 +125,18 @@ ipx_interface_t *load_ipx_interfaces(void)
|
|||||||
|
|
||||||
ipx_interface_t *nics = NULL;
|
ipx_interface_t *nics = NULL;
|
||||||
|
|
||||||
iface_config_t wc_config = get_iface_config(WILDCARD_IFACE_HWADDR);
|
iface_config_t wc_config = get_iface_config(WILDCARD_IFACE_HWADDR);
|
||||||
|
ipx_interface_t *wc_iface = NULL;
|
||||||
|
|
||||||
if(wc_config.enabled)
|
if(wc_config.enabled)
|
||||||
{
|
{
|
||||||
/* Initialise wildcard interface. */
|
/* Initialise wildcard interface. */
|
||||||
|
|
||||||
ipx_interface_t *wc_iface = _new_iface(wc_config.netnum, wc_config.nodenum);
|
if(!(wc_iface = _new_iface(wc_config.netnum, wc_config.nodenum)))
|
||||||
if(!wc_iface)
|
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use 0.0.0.0/0 as the IP/network of the wildcard interface
|
|
||||||
* to broadcast to 255.255.255.255 and match packets from any
|
|
||||||
* address.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(!_push_addr(wc_iface, 0, 0))
|
|
||||||
{
|
|
||||||
free_ipx_interface(wc_iface);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DL_APPEND(nics, wc_iface);
|
DL_APPEND(nics, wc_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +179,7 @@ ipx_interface_t *load_ipx_interfaces(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!_push_addr(iface, ipaddr, netmask))
|
if(!_push_addr(iface, ipaddr, netmask) || (wc_iface && !_push_addr(wc_iface, ipaddr, netmask)))
|
||||||
{
|
{
|
||||||
free_ipx_interface(iface);
|
free_ipx_interface(iface);
|
||||||
free_ipx_interface_list(&nics);
|
free_ipx_interface_list(&nics);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user