Browse Source

mdnsresponder: fix fd leak for IPv6 sockets

Signed-off-by: Steven Barth <steven@midlink.org>
Markus Stenberg 9 years ago
parent
commit
4764682b65
2 changed files with 6 additions and 3 deletions
  1. 1
    1
      net/mdnsresponder/Makefile
  2. 5
    2
      net/mdnsresponder/patches/100-linux_fixes.patch

+ 1
- 1
net/mdnsresponder/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=mDNSResponder
11 11
 PKG_VERSION:=567
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/

+ 5
- 2
net/mdnsresponder/patches/100-linux_fixes.patch View File

@@ -313,7 +313,7 @@ index 6effa12..7c1d6eb 100755
313 313
  }
314 314
  
315 315
 diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c
316
-index b392fc7..fe800af 100755
316
+index b392fc7..f551ad5 100755
317 317
 --- a/mDNSPosix/mDNSUNP.c
318 318
 +++ b/mDNSPosix/mDNSUNP.c
319 319
 @@ -63,6 +63,7 @@
@@ -357,9 +357,12 @@ index b392fc7..fe800af 100755
357 357
              myflags = 0;
358 358
              if (strncmp(lastname, ifname, IFNAMSIZ) == 0) {
359 359
                  if (doaliases == 0)
360
-@@ -205,7 +208,8 @@ gotError:
360
+@@ -204,8 +207,11 @@ gotError:
361
+         res0=NULL;
361 362
      }
362 363
  done:
364
++    if (fp)
365
++      fclose(fp);
363 366
      if (sockfd != -1) {
364 367
 -        assert(close(sockfd) == 0);
365 368
 +      int rv = close(sockfd);