wide-dhcp6c(3)

8052 ワード

これまでwide-dhcp 6 cも正常に使用できた.原因は、しばらく原因がどこにあるか見つからない.ログを印刷して見るしかありません.コンフィギュレーションファイルのエラーが疑われていたが、使用可能なコンフィギュレーションファイルは1つも見られなかった.dhcp 6 c.conf.はすべてexampleなどで、e文と略語を添付します.見たことがあるが、ざらざらした意味でもある.
まずcftokenを修正します.l,yywrapをcfdebug_にprint関数の前に補完して、このようにmake clean、更にmakeの時、更に生成するcftokenを使わない.cに入っています.
int yywrap()
{
	return 1;
}

static void
cfdebug_print(w, t, l)
	char *w, *t;
	int l;
{
	if (w) {
		dprintf(LOG_DEBUG, FNAME,
		    "%s [%s] (%d)", yy_start, w, t, l);
	} else {
		dprintf(LOG_DEBUG, FNAME,
		    "[%s] (%d)", yy_start, t, l);
	}
}

またYYDEBUGというマクロを開き、1に設定します.同時にグローバル変数yydebugも最初の場所で1に付与.これにより、プロセス中にどこでエラーが分析されているかがわかります.
root@vc0718t-evm:/usrfs# ./dhcp6c -c ./dhcp6c.conf -Df eth0
Jan/01/2000 06:11:10: get_duid: extracted an existing DUID from /usr/share/dhcp6c_duid: 00:01:00:01:00:00:3a:35:00:16:8e:a7:8c:f6
Jan/01/2000 06:11:10: dhcp6_ctl_authinit: failed to open /usr/share/dhcp6cctlkey: No such file or directory
Jan/01/2000 06:11:10: client6_init: failed initialize control message authentication282
Jan/01/2000 06:11:10: client6_init: skip opening control port375
5
should !
Starting parse
no should !
Entering state 0
Reducing stack by rule 1 (line 149):
-> $$ = nterm statements ()
Stack now 0
Entering state 1
Reading a token: Next token is token INTERFACE ()
Shifting token INTERFACE ()
Entering state 3
Reading a token: Next token is token IFNAME ()
Shifting token IFNAME ()
Entering state 20
Reading a token: Next token is token BCL ()
Shifting token BCL ()
Entering state 40
Reducing stack by rule 36 (line 486):
-> $$ = nterm declarations ()
Stack now 0 1 3 20 40
Entering state 62
Reading a token: Next token is token SEND ()
Shifting token SEND ()
Entering state 87
Reading a token: Next token is token IA_NA ()
Shifting token IA_NA ()
Entering state 126
Reading a token: Next token is token NUMBER ()
Shifting token NUMBER ()
Entering state 185
Reducing stack by rule 55 (line 643):
   $1 = token IA_NA ()
   $2 = token NUMBER ()
-> $$ = nterm dhcpoption ()
Stack now 0 1 3 20 40 62 87
Entering state 142
Reading a token: Next token is token EOS ()
Reducing stack by rule 50 (line 605):
   $1 = nterm dhcpoption ()
-> $$ = nterm dhcpoption_list ()
Stack now 0 1 3 20 40 62 87
Entering state 143
Next token is token EOS ()
Shifting token EOS ()
Entering state 189
Reducing stack by rule 38 (line 505):
   $1 = token SEND ()
   $2 = nterm dhcpoption_list ()
   $3 = token EOS ()
-> $$ = nterm declaration ()
Stack now 0 1 3 20 40 62
Entering state 98
Reducing stack by rule 37 (line 487):
   $1 = nterm declarations ()
   $2 = nterm declaration ()
-> $$ = nterm declarations ()
Stack now 0 1 3 20 40
Entering state 62
Reading a token: Next token is token SEND ()
Shifting token SEND ()
Entering state 87
Reading a token: Next token is token IA_PD ()
Shifting token IA_PD ()
Entering state 125
Reading a token: Next token is token NUMBER ()
Shifting token NUMBER ()
Entering state 184
Reducing stack by rule 54 (line 635):
   $1 = token IA_PD ()
   $2 = token NUMBER ()
-> $$ = nterm dhcpoption ()
Stack now 0 1 3 20 40 62 87
Entering state 142
Reading a token: Next token is token EOS ()
Reducing stack by rule 50 (line 605):
   $1 = nterm dhcpoption ()
-> $$ = nterm dhcpoption_list ()
Stack now 0 1 3 20 40 62 87
Entering state 143
Next token is token EOS ()
Shifting token EOS ()
Entering state 189
Reducing stack by rule 38 (line 505):
   $1 = token SEND ()
   $2 = nterm dhcpoption_list ()
   $3 = token EOS ()
-> $$ = nterm declaration ()
Stack now 0 1 3 20 40 62
Entering state 98
Reducing stack by rule 37 (line 487):
   $1 = nterm declarations ()
   $2 = nterm declaration ()
-> $$ = nterm declarations ()
Stack now 0 1 3 20 40
Entering state 62
Reading a token: Next token is token SEND ()
Shifting token SEND ()
Entering state 87
Reading a token: Next token is token DNS_SERVERS ()
Shifting token DNS_SERVERS ()
Entering state 128
Reducing stack by rule 58 (line 667):
   $1 = token DNS_SERVERS ()
-> $$ = nterm dhcpoption ()
Stack now 0 1 3 20 40 62 87
Entering state 142
Reading a token: Next token is token COMMA ()
Shifting token COMMA ()
Entering state 188
Reading a token: Next token is token DNS_NAME ()
Shifting token DNS_NAME ()
Entering state 129
Reducing stack by rule 59 (line 675):
   $1 = token DNS_NAME ()
-> $$ = nterm dhcpoption ()
Stack now 0 1 3 20 40 62 87 142 188
Entering state 142
Reading a token: Next token is token EOS ()
Reducing stack by rule 50 (line 605):
   $1 = nterm dhcpoption ()
-> $$ = nterm dhcpoption_list ()
Stack now 0 1 3 20 40 62 87 142 188
Entering state 215
Reducing stack by rule 51 (line 609):
   $1 = nterm dhcpoption ()
   $2 = token COMMA ()
   $3 = nterm dhcpoption_list ()
-> $$ = nterm dhcpoption_list ()
Stack now 0 1 3 20 40 62 87
Entering state 143
Next token is token EOS ()
Shifting token EOS ()
Entering state 189
Reducing stack by rule 38 (line 505):
   $1 = token SEND ()
   $2 = nterm dhcpoption_list ()
   $3 = token EOS ()
-> $$ = nterm declaration ()
Stack now 0 1 3 20 40 62
Entering state 98
Reducing stack by rule 37 (line 487):
   $1 = nterm declarations ()
   $2 = nterm declaration ()
-> $$ = nterm declarations ()
Stack now 0 1 3 20 40
Entering state 62
Reading a token: Next token is token ECL ()
Shifting token ECL ()
Entering state 96
Reading a token: Next token is token EOS ()
Shifting token EOS ()
Entering state 154
Reducing stack by rule 11 (line 166):
   $1 = token INTERFACE ()
   $2 = token IFNAME ()
   $3 = token BCL ()
   $4 = nterm declarations ()
   $5 = token ECL ()
   $6 = token EOS ()
-> $$ = nterm interface_statement ()
Stack now 0 1
Entering state 12
Reducing stack by rule 3 (line 155):
   $1 = nterm interface_statement ()
-> $$ = nterm statement ()
Stack now 0 1
Entering state 11
Reducing stack by rule 2 (line 151):
   $1 = nterm statements ()
   $2 = nterm statement ()
-> $$ = nterm statements ()
Stack now 0
Entering state 1
Reading a token: Next token is token STRING ()
Error: popping nterm statements ()
Stack now 0
Cleanup: discarding lookahead token STRING ()
Stack now 0
Jan/01/2000 06:11:10: main: failed to parse configuration file 230

プログラムを実行すると、次の解析エラーのように見えますが、reading a token:Next token is STRING()は、ここでファイルの解析エラーが発生しているようです.
では、やはりプロファイルの問題です...
続きを待つ
構成されていますが、プロファイルも簡単です.e文があまり上手ではありません.長い間たくさん読んでも分からないようです.
そして参考にしました
www.infradead.org/~tgr/libnl/
上に書いてあるたくさんのものも、あまり読めませんでした.
dhcp 6 cです.confの簡単なプロファイルは以下の通りで、元の時にいくつかの他の構成情報を追加して、結果はかえって多くのエラーが発生します
interface eth0 {
	send ia-na 0;
};

id-assoc na{
};
ログ情報から
Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option status code, len 2
Jan/01/2000 08:41:46:   status code: success
Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option DNS, len 16
Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option SIP server address, len 64
Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option NTP server, len 48
Jan/01/2000 08:41:46: client6_recvreply: status code: success
Jan/01/2000 08:41:46: info_printf: nameserver[0] 2001:db8:3333::39cc:fe88:d094
Jan/01/2000 08:41:46: info_printf: NTP server[0] 2000::200
Jan/01/2000 08:41:46: info_printf: NTP server[1] 2000::201
Jan/01/2000 08:41:46: info_printf: NTP server[2] 2000::202
Jan/01/2000 08:41:46: info_printf: SIP server address[0] 2000::300
Jan/01/2000 08:41:46: info_printf: SIP server address[1] 2000::302
Jan/01/2000 08:41:46: info_printf: SIP server address[2] 2000::303
Jan/01/2000 08:41:46: info_printf: SIP server address[3] 2000::304
Jan/01/2000 08:41:46: get_ia: make an IA: NA-0
Jan/01/2000 08:41:46: update_address: create an address 2001:db8:3333::39cc:0:1007 pltime=86400, vltime=86400
Jan/01/2000 08:41:46: ifaddrconf: add an address 2001:db8:3333::39cc:0:1007/128 on eth0
Jan/01/2000 08:41:46: dhcp6_remove_event: removing an event on eth0, state=REQUEST

およびiconfigをタップして、アドレスはすべて配置しました.何日も暇な時間を過ごしたようだ.こちらはアメリカのnetgearをipv 6として割り当てたサーバーを使用しています.见たところokの...