git://git.onelab.eu
/
util-vserver-pl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check ifa->ifa_addr otherwise existing TUN device causes following segfault;
[util-vserver-pl.git]
/
python
/
vserverimpl.c
diff --git
a/python/vserverimpl.c
b/python/vserverimpl.c
index
4c6bb42
..
1f0d913
100644
(file)
--- a/
python/vserverimpl.c
+++ b/
python/vserverimpl.c
@@
-49,7
+49,6
@@
POSSIBILITY OF SUCH DAMAGE.
#include "config.h"
#include "vserver.h"
#include "config.h"
#include "vserver.h"
-#include "planetlab.h"
static inline PyObject *inc_and_ret_none(void)
{
static inline PyObject *inc_and_ret_none(void)
{
@@
-402,7
+401,7
@@
get_mask(struct vc_net_addr *addr)
if (getifaddrs(&head) == -1)
return -1;
for (ifa = head; ifa; ifa = ifa->ifa_next) {
if (getifaddrs(&head) == -1)
return -1;
for (ifa = head; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family == family &&
+ if (ifa->ifa_addr
&& ifa->ifa_addr
->sa_family == family &&
memcmp((char *) ifa->ifa_addr + offset, ip, len) == 0) {
switch (addr->vna_type) {
case VC_NXA_TYPE_IPV4:
memcmp((char *) ifa->ifa_addr + offset, ip, len) == 0) {
switch (addr->vna_type) {
case VC_NXA_TYPE_IPV4: