projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #define s6_addr32.
[tinc]
/
src
/
subnet.c
diff --git
a/src/subnet.c
b/src/subnet.c
index
5fdc045
..
5e09625
100644
(file)
--- a/
src/subnet.c
+++ b/
src/subnet.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: subnet.c,v 1.1.2.3
0 2002/02/18 16:25:19
guus Exp $
+ $Id: subnet.c,v 1.1.2.3
3 2002/03/12 14:20:44
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-218,7
+218,7
@@
cp
subnet->type = SUBNET_IPV6;
subnet->net.ipv6.masklength = 128;
for(i = 0; i < 8; i++)
subnet->type = SUBNET_IPV6;
subnet->net.ipv6.masklength = 128;
for(i = 0; i < 8; i++)
- subnet->net.ipv6.address.x[i] = htons(x[i]);
+
subnet->net.ipv6.address.x[i] = htons(x[i]);
return subnet;
}
return subnet;
}
@@
-318,7
+318,10
@@
cp
if(p)
{
if(p->type != SUBNET_IPV4)
if(p)
{
if(p->type != SUBNET_IPV4)
- return NULL;
+ {
+ p = NULL;
+ break;
+ }
if (!maskcmp((char *)address, (char *)&p->net.ipv4.address, p->net.ipv4.masklength, sizeof(ipv4_t)))
break;
if (!maskcmp((char *)address, (char *)&p->net.ipv4.address, p->net.ipv4.masklength, sizeof(ipv4_t)))
break;
@@
-330,9
+333,9
@@
cp
maskcpy((char *)&subnet.net.ipv4.address, (char *)&p->net.ipv4.address, subnet.net.ipv4.masklength, sizeof(ipv4_t));
}
}
maskcpy((char *)&subnet.net.ipv4.address, (char *)&p->net.ipv4.address, subnet.net.ipv4.masklength, sizeof(ipv4_t));
}
}
-
} while (p);
-
-
return p;
+ } while (p);
+cp
+ return p;
}
subnet_t *lookup_subnet_ipv6(ipv6_t *address)
}
subnet_t *lookup_subnet_ipv6(ipv6_t *address)
@@
-368,7
+371,7
@@
cp
}
}
} while (p);
}
}
} while (p);
-
+cp
return p;
}
return p;
}