]>
Commit | Line | Data |
---|---|---|
f888983c | 1 | --- a/common/discover.c~ 2008-09-09 22:29:01.326643118 +0200 |
2 | +++ a/common/discover.c 2008-09-09 22:34:07.565778860 +0200 | |
3 | @@ -421,6 +421,7 @@ begin_iface_scan(struct iface_conf_list | |
4 | } | |
5 | ||
6 | #ifdef DHCPv6 | |
7 | + if (local_family == AF_INET6) { | |
8 | ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); | |
9 | if (ifaces->fp6 == NULL) { | |
10 | log_error("Error opening '/proc/net/if_inet6' to " | |
11 | @@ -431,6 +432,7 @@ begin_iface_scan(struct iface_conf_list | |
12 | ifaces->fp = NULL; | |
13 | return 0; | |
14 | } | |
15 | + } | |
16 | #endif | |
17 | ||
18 | return 1; | |
19 | @@ -700,9 +700,11 @@ next_iface(struct iface_info *info, int | |
20 | return 1; | |
21 | } | |
22 | #ifdef DHCPv6 | |
23 | + if (local_family == AF_INET6) { | |
24 | if (!(*err)) { | |
25 | return next_iface6(info, err, ifaces); | |
26 | } | |
27 | + } | |
28 | #endif | |
29 | return 0; | |
30 | } | |
31 | @@ -719,7 +719,8 @@ end_iface_scan(struct iface_conf_list *i | |
32 | close(ifaces->sock); | |
33 | ifaces->sock = -1; | |
34 | #ifdef DHCPv6 | |
35 | - fclose(ifaces->fp6); | |
36 | + if (local_family == AF_INET6) | |
37 | + fclose(ifaces->fp6); | |
38 | ifaces->fp6 = NULL; | |
39 | #endif | |
40 | } |