diff options
author | Jeremy Allison <jra@samba.org> | 2016-09-23 12:16:58 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-10-20 10:43:28 +0200 |
commit | 9236d1cf58b33af598141a142f6e4fc2e4d491f5 (patch) | |
tree | 8827efa3261c21abfc7e4ae83aefb12203400706 | |
parent | 0918f181c5a333cfa29fd485f60045109d3d2f81 (diff) | |
download | samba-9236d1cf58b33af598141a142f6e4fc2e4d491f5.tar.gz |
s3: nmbd: Now attrs array mirrors fd's array use it in preference.
This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 376e04656b6755d1a182430b39273a93495d00b2)
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 1b59d6bcdf4..77add59bdee 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -2004,7 +2004,7 @@ bool listen_for_packets(struct messaging_context *msg, bool run_election) client_port = DGRAM_PORT; } - packet = read_packet(fds[i].fd, packet_type); + packet = read_packet(attrs[i].fd, packet_type); if (!packet) { continue; } @@ -2014,7 +2014,7 @@ bool listen_for_packets(struct messaging_context *msg, bool run_election) * only is set then check it came from one of our local nets. */ if (lp_bind_interfaces_only() && - (fds[i].fd == client_fd) && + (attrs[i].fd == client_fd) && (!is_local_net_v4(packet->ip))) { DEBUG(7,("discarding %s packet sent to broadcast socket from %s:%d\n", packet_name, inet_ntoa(packet->ip), packet->port)); @@ -2053,10 +2053,10 @@ bool listen_for_packets(struct messaging_context *msg, bool run_election) if (attrs[i].broadcast) { /* this is a broadcast socket */ - packet->send_fd = fds[i-1].fd; + packet->send_fd = attrs[i-1].fd; } else { /* this is already a unicast socket */ - packet->send_fd = fds[i].fd; + packet->send_fd = attrs[i].fd; } queue_packet(packet); |