SOURCES: portmap-misc.patch - now it works
baggins
baggins at pld-linux.org
Mon Jan 30 17:23:13 CET 2006
Author: baggins Date: Mon Jan 30 16:23:12 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- now it works
---- Files affected:
SOURCES:
portmap-misc.patch (1.7 -> 1.8)
---- Diffs:
================================================================
Index: SOURCES/portmap-misc.patch
diff -u SOURCES/portmap-misc.patch:1.7 SOURCES/portmap-misc.patch:1.8
--- SOURCES/portmap-misc.patch:1.7 Mon Jan 30 16:59:56 2006
+++ SOURCES/portmap-misc.patch Mon Jan 30 17:23:07 2006
@@ -473,13 +473,14 @@
/* grow_addrs - extend list of local interface addresses */
-@@ -114,6 +116,16 @@
+@@ -114,6 +116,17 @@
* presence of non-IP interfaces.
*/
+ /* if we have bindaddr it must be local, add it unconditionally
+ * in case of ioctl problems
-+ * */
++ */
++ num_local = 0;
+ if (have_bindaddr && addrs == 0) {
+ if (num_local >= num_addrs)
+ grow_addrs();
@@ -490,3 +491,25 @@
if ((sock = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
perror("socket");
return (0);
+@@ -128,19 +129,18 @@
+
+ if ((sock = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
+ perror("socket");
+- return (0);
++ return (num_local);
+ }
+ ifc.ifc_len = sizeof(buf);
+ ifc.ifc_buf = buf;
+ if (ioctl(sock, SIOCGIFCONF, (char *) &ifc) < 0) {
+ perror("SIOCGIFCONF");
+ (void) close(sock);
+- return (0);
++ return (num_local);
+ }
+ /* Get IP address of each active IP network interface. */
+
+ the_end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
+- num_local = 0;
+ for (ifr = ifc.ifc_req; ifr < the_end; ifr++) {
+ if (ifr->ifr_addr.sa_family == AF_INET) { /* IP net interface */
+ ifreq = *ifr;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/portmap-misc.patch?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list