瀏覽代碼

fixed struct change

master
root 5 年之前
父節點
當前提交
29cbda2c5a
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. 4
    4
      src/lc6_bootstrap.c

+ 4
- 4
src/lc6_bootstrap.c 查看文件

@@ -13,17 +13,17 @@ char* lc6bootstrap_getip(LC6_BOOTSTRAP *bs) {
if ( !bs )
return NULL;

if ( bs->af == 4 ) {
if ( bs->ip.af == 4 ) {
str = malloc(INET_ADDRSTRLEN);
assert(str);
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);
assert(str);
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;
}

Loading…
取消
儲存