Browse Source

fixed struct change

master
root 5 years ago
parent
commit
29cbda2c5a
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/lc6_bootstrap.c

+ 4
- 4
src/lc6_bootstrap.c View File

if ( !bs ) if ( !bs )
return NULL; return NULL;


if ( bs->af == 4 ) {
if ( bs->ip.af == 4 ) {
str = malloc(INET_ADDRSTRLEN); str = malloc(INET_ADDRSTRLEN);
assert(str); assert(str);
memset(str, 0, INET_ADDRSTRLEN); memset(str, 0, INET_ADDRSTRLEN);
inet_ntop(AF_INET, &bs->addr.inet, str, INET_ADDRSTRLEN);
inet_ntop(AF_INET, &bs->ip.addr.inet, str, INET_ADDRSTRLEN);
} }
else if ( bs->af == 6 ) {
else if ( bs->ip.af == 6 ) {
str = malloc(INET6_ADDRSTRLEN); str = malloc(INET6_ADDRSTRLEN);
assert(str); assert(str);
memset(str, 0, INET6_ADDRSTRLEN); memset(str, 0, INET6_ADDRSTRLEN);
inet_ntop(AF_INET6, &bs->addr.inet6, str, INET6_ADDRSTRLEN);
inet_ntop(AF_INET6, &bs->ip.addr.inet6, str, INET6_ADDRSTRLEN);
} }
return str; return str;
} }

Loading…
Cancel
Save