diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-28 02:02:08 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-28 05:10:53 +0200 |
commit | 14c05cf93ad1a6087fe4751e1057a7c0c0e91c2c (patch) | |
tree | b33b4a0cf8480028a916f537341709a6bc6df9e6 | |
parent | 1210b8abe73f39f85f363cbbfa2a990e2ccd4517 (diff) | |
download | samba-14c05cf93ad1a6087fe4751e1057a7c0c0e91c2c.tar.gz samba-14c05cf93ad1a6087fe4751e1057a7c0c0e91c2c.tar.bz2 samba-14c05cf93ad1a6087fe4751e1057a7c0c0e91c2c.zip |
s4:libcli/resolve: only try broadcast messages to ipv4 addresses
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 28 05:10:53 CEST 2011 on sn-devel-104
-rw-r--r-- | source4/libcli/resolve/bcast.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/libcli/resolve/bcast.c b/source4/libcli/resolve/bcast.c index 150705f8d8..787d048a68 100644 --- a/source4/libcli/resolve/bcast.c +++ b/source4/libcli/resolve/bcast.c @@ -53,8 +53,18 @@ struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx, if (address_list == NULL) return NULL; for (i=0;i<num_interfaces;i++) { - const char *bcast = iface_list_n_bcast(data->ifaces, i); - if (bcast == NULL) continue; + bool ipv4 = iface_list_n_is_v4(data->ifaces, i); + const char *bcast; + + if (!ipv4) { + continue; + } + + bcast = iface_list_n_bcast(data->ifaces, i); + if (bcast == NULL) { + continue; + } + address_list[count] = talloc_strdup(address_list, bcast); if (address_list[count] == NULL) { talloc_free(address_list); |