]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Allow key id 0
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 19 May 2020 00:50:47 +0000 (02:50 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 19 May 2020 00:50:47 +0000 (02:50 +0200)
There is nothing in RFCs specifying that id 0 is not allowed. Some
implementations does not support it, while some other use key id 0 by
default. We allow it but start with key id 1 by default.

Thanks to Kenth Eriksson for the bugreport.

doc/bird.sgml
nest/config.Y

index 33f6418f5f4775278309cbc40d111ee96953e40f..401b4035e27d7a95df16b801204998cbd21533d8 100644 (file)
@@ -783,11 +783,12 @@ agreement").
 
 <descrip>
        <tag><label id="proto-pass-id">id <M>num</M></tag>
-       ID of the password, (1-255). If it is not used, BIRD will choose ID based
-       on an order of the password item in the interface. For example, second
-       password item in one interface will have default ID 2. ID is used by
-       some routing protocols to identify which password was used to
-       authenticate protocol packets.
+       ID of the password, (0-255). If it is not specified, BIRD will choose ID
+       based on an order of the password item in the interface, starting from
+       1. For example, second password item in one interface will have default
+       ID 2. ID 0 is allowed by BIRD, but some other implementations may not
+       allow it. ID is used by some routing protocols to identify which
+       password was used to authenticate protocol packets.
 
        <tag><label id="proto-pass-gen-from">generate from "<m/time/"</tag>
        The start time of the usage of the password for packet signing.
index bd1157c640c83dd94fe94e8157c430d15191aebd..f2f1df34cd15d11635445665379fe8f20d58e74f 100644 (file)
@@ -480,7 +480,7 @@ password_item_params:
  | ACCEPT TO time ';' password_item_params { this_p_item->accto = $3; }
  | FROM time ';' password_item_params { this_p_item->genfrom = this_p_item->accfrom = $2; }
  | TO time ';' password_item_params { this_p_item->gento = this_p_item->accto = $2; }
- | ID expr ';' password_item_params { this_p_item->id = $2; if ($2 <= 0) cf_error("Password ID has to be greated than zero."); }
+ | ID expr ';' password_item_params { this_p_item->id = $2; if ($2 > 255) cf_error("Password ID must be in range 0-255"); }
  | ALGORITHM password_algorithm ';' password_item_params { this_p_item->alg = $2; }
  ;