Lines 95-100
Link Here
|
95 |
/* interface prefix parameters */ |
95 |
/* interface prefix parameters */ |
96 |
struct sockaddr_in6 paddr; |
96 |
struct sockaddr_in6 paddr; |
97 |
int plen; |
97 |
int plen; |
|
|
98 |
u_int32_t vltime; |
99 |
u_int32_t pltime; |
98 |
|
100 |
|
99 |
/* address assigned on the interface based on the prefix */ |
101 |
/* address assigned on the interface based on the prefix */ |
100 |
struct sockaddr_in6 ifaddr; |
102 |
struct sockaddr_in6 ifaddr; |
Lines 481-486
Link Here
|
481 |
if (b) |
483 |
if (b) |
482 |
a->s6_addr[--i] |= *sp; |
484 |
a->s6_addr[--i] |= *sp; |
483 |
|
485 |
|
|
|
486 |
/* copy prefix preferred and valid lifetime */ |
487 |
|
488 |
ifpfx->pltime = prefix->pltime; |
489 |
ifpfx->vltime = prefix->vltime; |
490 |
|
484 |
/* configure the corresponding address */ |
491 |
/* configure the corresponding address */ |
485 |
ifpfx->ifaddr = ifpfx->paddr; |
492 |
ifpfx->ifaddr = ifpfx->paddr; |
486 |
for (i = 15; i >= pconf->ifid_len / 8; i--) |
493 |
for (i = 15; i >= pconf->ifid_len / 8; i--) |
Lines 500-509
Link Here
|
500 |
return (-1); |
507 |
return (-1); |
501 |
} |
508 |
} |
502 |
|
509 |
|
503 |
#ifndef ND6_INFINITE_LIFETIME |
|
|
504 |
#define ND6_INFINITE_LIFETIME 0xffffffff |
505 |
#endif |
506 |
|
507 |
static int |
510 |
static int |
508 |
pd_ifaddrconf(cmd, ifpfx) |
511 |
pd_ifaddrconf(cmd, ifpfx) |
509 |
ifaddrconf_cmd_t cmd; |
512 |
ifaddrconf_cmd_t cmd; |
Lines 512-517
Link Here
|
512 |
struct prefix_ifconf *pconf; |
515 |
struct prefix_ifconf *pconf; |
513 |
|
516 |
|
514 |
pconf = ifpfx->ifconf; |
517 |
pconf = ifpfx->ifconf; |
515 |
return (ifaddrconf(cmd, pconf->ifname, &ifpfx->ifaddr, ifpfx->plen, |
518 |
|
516 |
ND6_INFINITE_LIFETIME, ND6_INFINITE_LIFETIME)); |
519 |
return (ifaddrconf(cmd, pconf->ifname, &ifpfx->ifaddr, ifpfx->plen, |
|
|
520 |
ifpfx->pltime, ifpfx->vltime)); |
517 |
} |
521 |
} |