Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 205214 | Differences between
and this patch

Collapse All | Expand All

(-)dhcp-4.0.0.ORIG/client/clparse.c (-4 / +9 lines)
Lines 37-43 Link Here
37
37
38
struct client_config top_level_config;
38
struct client_config top_level_config;
39
39
40
#define NUM_DEFAULT_REQUESTED_OPTS	9
40
#define NUM_DEFAULT_REQUESTED_OPTS	10
41
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
41
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
42
42
43
static void parse_client_default_duid(struct parse *cfile);
43
static void parse_client_default_duid(struct parse *cfile);
Lines 98-112 Link Here
98
				dhcp_universe.code_hash, &code, 0, MDL);
98
				dhcp_universe.code_hash, &code, 0, MDL);
99
99
100
	/* 8 */
100
	/* 8 */
101
	code = D6O_NAME_SERVERS;
101
	code = DHO_NTP_SERVERS;
102
	option_code_hash_lookup(&default_requested_options[7],
102
	option_code_hash_lookup(&default_requested_options[7],
103
				dhcpv6_universe.code_hash, &code, 0, MDL);
103
				dhcp_universe.code_hash, &code, 0, MDL);
104
104
105
	/* 9 */
105
	/* 9 */
106
	code = D6O_DOMAIN_SEARCH;
106
	code = D6O_NAME_SERVERS;
107
	option_code_hash_lookup(&default_requested_options[8],
107
	option_code_hash_lookup(&default_requested_options[8],
108
				dhcpv6_universe.code_hash, &code, 0, MDL);
108
				dhcpv6_universe.code_hash, &code, 0, MDL);
109
109
110
	/* 10 */
111
	code = D6O_DOMAIN_SEARCH;
112
	option_code_hash_lookup(&default_requested_options[9],
113
				dhcpv6_universe.code_hash, &code, 0, MDL);
114
110
	for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
115
	for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
111
		if (default_requested_options[code] == NULL)
116
		if (default_requested_options[code] == NULL)
112
			log_fatal("Unable to find option definition for "
117
			log_fatal("Unable to find option definition for "
(-)dhcp-4.0.0.ORIG/client/scripts/bsdos (+20 lines)
Lines 29-34 Link Here
29
29
30
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
30
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
31
  fi
31
  fi
32
  # If we're making confs, may as well make an ntp.conf too
33
  make_ntp_conf
34
}
35
36
make_ntp_conf() {
37
  if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
38
    if [ x$new_ntp_servers != x ]; then
39
      conf="# Generated by dhclient for interface $interface\n"
40
      conf="${conf}restrict default noquery notrust nomodify\n"
41
      conf="${conf}restrict 127.0.0.1\n"
42
      for ntpserver in $new_ntp_servers; do
43
        conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
44
        conf="${conf}server $ntpserver\n"
45
      done
46
      conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
47
      conf="${conf}logfile /var/log/ntp.log\n"
48
      printf "${conf}" > /etc/ntp.conf
49
      chmod 644 /etc/ntp.conf
50
    fi
51
  fi
32
}
52
}
33
53
34
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
54
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
(-)dhcp-4.0.0.ORIG/client/scripts/freebsd (+20 lines)
Lines 73-78 Link Here
73
      fi
73
      fi
74
    fi
74
    fi
75
  fi
75
  fi
76
  # If we're making confs, may as well make an ntp.conf too
77
  make_ntp_conf
78
}
79
80
make_ntp_conf() {
81
  if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
82
    if [ "x$new_ntp_servers" != x ]; then
83
      conf="# Generated by dhclient for interface $interface\n"
84
      conf="${conf}restrict default noquery notrust nomodify\n"
85
      conf="${conf}restrict 127.0.0.1\n"
86
      for ntpserver in $new_ntp_servers; do
87
        conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
88
        conf="${conf}server $ntpserver\n"
89
      done
90
      conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
91
      conf="${conf}logfile /var/log/ntp.log\n"
92
      printf "${conf}" > /etc/ntp.conf
93
      chmod 644 /etc/ntp.conf
94
    fi
95
  fi
76
}
96
}
77
97
78
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
98
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
(-)dhcp-4.0.0.ORIG/client/scripts/linux (+20 lines)
Lines 55-60 Link Here
55
55
56
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
56
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
57
  fi
57
  fi
58
  # If we're making confs, may as well make an ntp.conf too
59
  make_ntp_conf
60
}
61
62
make_ntp_conf() {
63
  if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
64
    if [ "x$new_ntp_servers" != x ]; then
65
      conf="# Generated by dhclient for interface $interface\n"
66
      conf="${conf}restrict default noquery notrust nomodify\n"
67
      conf="${conf}restrict 127.0.0.1\n"
68
      for ntpserver in $new_ntp_servers; do
69
        conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
70
        conf="${conf}server $ntpserver\n"
71
      done
72
      conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
73
      conf="${conf}logfile /var/log/ntp.log\n"
74
      printf "${conf}" > /etc/ntp.conf
75
      chmod 644 /etc/ntp.conf
76
    fi
77
  fi
58
}
78
}
59
79
60
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
80
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
(-)dhcp-4.0.0.ORIG/client/scripts/netbsd (+20 lines)
Lines 29-34 Link Here
29
29
30
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
30
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
31
  fi
31
  fi
32
  # If we're making confs, may as well make an ntp.conf too
33
  make_ntp_conf
34
}
35
36
make_ntp_conf() {
37
  if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
38
    if [ "x$new_ntp_servers" != x ]; then
39
      conf="# Generated by dhclient for interface $interface\n"
40
      conf="${conf}restrict default noquery notrust nomodify\n"
41
      conf="${conf}restrict 127.0.0.1\n"
42
      for ntpserver in $new_ntp_servers; do
43
        conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
44
        conf="${conf}server $ntpserver\n"
45
      done
46
      conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
47
      conf="${conf}logfile /var/log/ntp.log\n"
48
      printf "${conf}" > /etc/ntp.conf
49
      chmod 644 /etc/ntp.conf
50
    fi
51
  fi
32
}
52
}
33
53
34
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
54
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
(-)dhcp-4.0.0.ORIG/client/scripts/openbsd (+20 lines)
Lines 29-34 Link Here
29
29
30
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
30
    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
31
  fi
31
  fi
32
  # If we're making confs, may as well make an ntp.conf too
33
  make_ntp_conf
34
}
35
36
make_ntp_conf() {
37
  if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
38
    if [ "x$new_ntp_servers" != x ]; then
39
      conf="# Generated by dhclient for interface $interface\n"
40
      conf="${conf}restrict default noquery notrust nomodify\n"
41
      conf="${conf}restrict 127.0.0.1\n"
42
      for ntpserver in $new_ntp_servers; do
43
        conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
44
        conf="${conf}server $ntpserver\n"
45
      done
46
      conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
47
      conf="${conf}logfile /var/log/ntp.log\n"
48
      printf "${conf}" > /etc/ntp.conf
49
      chmod 644 /etc/ntp.conf
50
    fi
51
  fi
32
}
52
}
33
53
34
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
54
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
(-)dhcp-4.0.0.ORIG/client/scripts/solaris (+20 lines)
Lines 17-22 Link Here
17
17
18
    mv /etc/resolv.conf.dhclient /etc/resolv.conf
18
    mv /etc/resolv.conf.dhclient /etc/resolv.conf
19
  fi
19
  fi
20
  # If we're making confs, may as well make an ntp.conf too
21
  make_ntp_conf
22
}
23
24
make_ntp_conf() {
25
  if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
26
    if [ "x$new_ntp_servers" != x ]; then
27
      conf="# Generated by dhclient for interface $interface\n"
28
      conf="${conf}restrict default noquery notrust nomodify\n"
29
      conf="${conf}restrict 127.0.0.1\n"
30
      for ntpserver in $new_ntp_servers; do
31
        conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
32
        conf="${conf}server $ntpserver\n"
33
      done
34
      conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
35
      conf="${conf}logfile /var/log/ntp.log\n"
36
      printf "${conf}" > /etc/ntp.conf
37
      chmod 644 /etc/ntp.conf
38
    fi
39
  fi
20
}
40
}
21
41
22
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
42
# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.

Return to bug 205214