diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-06-30 10:09:56 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-06-30 13:20:05 +0200 |
commit | 75e9f2110876137a57632d223248ac51dbfc4569 (patch) | |
tree | 2eb82d4c904f3a1ffd1d7a5d4794e2cfcf6da2ba /source3/nmbd | |
parent | 847ca0a5d791d881be8d9a0721bf30399c80013b (diff) | |
download | samba-75e9f2110876137a57632d223248ac51dbfc4569.tar.gz samba-75e9f2110876137a57632d223248ac51dbfc4569.tar.bz2 samba-75e9f2110876137a57632d223248ac51dbfc4569.zip |
s3:nmbd_subnetdb: close all sockets attached to a subnet in close_subnet() (bug #8276)
metze
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_subnetdb.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c index 666679a90b..311a240923 100644 --- a/source3/nmbd/nmbd_subnetdb.c +++ b/source3/nmbd/nmbd_subnetdb.c @@ -56,13 +56,21 @@ yet and it may be in use by a response record void close_subnet(struct subnet_record *subrec) { + if (subrec->nmb_sock != -1) { + close(subrec->nmb_sock); + subrec->nmb_sock = -1; + } + if (subrec->nmb_bcast != -1) { + close(subrec->nmb_bcast); + subrec->nmb_bcast = -1; + } if (subrec->dgram_sock != -1) { close(subrec->dgram_sock); subrec->dgram_sock = -1; } - if (subrec->nmb_sock != -1) { - close(subrec->nmb_sock); - subrec->nmb_sock = -1; + if (subrec->dgram_bcast != -1) { + close(subrec->dgram_bcast); + subrec->dgram_bcast = -1; } DLIST_REMOVE(subnetlist, subrec); |