Lines 966-974
setifaddr(const char *addr, int param, int s, const struct afswtch *afp)
Link Here
|
966 |
static void |
966 |
static void |
967 |
settunnel(const char *src, const char *dst, int s, const struct afswtch *afp) |
967 |
settunnel(const char *src, const char *dst, int s, const struct afswtch *afp) |
968 |
{ |
968 |
{ |
969 |
struct addrinfo *srcres, *dstres; |
969 |
struct addrinfo hints, *srcres, *dstres; |
970 |
int ecode; |
970 |
int ecode; |
971 |
|
971 |
|
|
|
972 |
memset(&hints, 0, sizeof(hints)); |
973 |
hints.ai_family = afp->af_af; |
974 |
|
972 |
if (afp->af_settunnel == NULL) { |
975 |
if (afp->af_settunnel == NULL) { |
973 |
warn("address family %s does not support tunnel setup", |
976 |
warn("address family %s does not support tunnel setup", |
974 |
afp->af_name); |
977 |
afp->af_name); |
Lines 979-985
settunnel(const char *src, const char *dst, int s, const struct afswtch *afp)
Link Here
|
979 |
errx(1, "error in parsing address string: %s", |
982 |
errx(1, "error in parsing address string: %s", |
980 |
gai_strerror(ecode)); |
983 |
gai_strerror(ecode)); |
981 |
|
984 |
|
982 |
if ((ecode = getaddrinfo(dst, NULL, NULL, &dstres)) != 0) |
985 |
if ((ecode = getaddrinfo(dst, NULL, &hints, &dstres)) != 0) |
983 |
errx(1, "error in parsing address string: %s", |
986 |
errx(1, "error in parsing address string: %s", |
984 |
gai_strerror(ecode)); |
987 |
gai_strerror(ecode)); |
985 |
|
988 |
|