diff options
author | Jeremy Allison <jra@samba.org> | 2016-09-23 12:16:58 -0700 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2016-09-24 19:52:08 +0200 |
commit | 376e04656b6755d1a182430b39273a93495d00b2 (patch) | |
tree | b54e2fb714c64e3bff98e849615cda9c5d68b3d9 /source3 | |
parent | 7f0717e751930cd5da029c1852ff9f61f95e40b7 (diff) | |
download | samba-376e04656b6755d1a182430b39273a93495d00b2.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>
Diffstat (limited to 'source3')
-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 26486797de7..73219223834 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); |