<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello</div><div><br></div><div>I find that the graceful restart time number configuration can accept 32bits.</div><div>bgp_proto GRACEFUL RESTART TIME expr ';' { BGP_CFG->gr_time = $5; }</div><div><br></div><div>While in the RFC 4724 section 3 it says the graceful restart time is 12bits and restart flags is 4bits. </div><div><pre class="newpage" style="font-size: 13.3333px; margin-top: 0px; margin-bottom: 0px; break-before: page;"> +--------------------------------------------------+
| Restart Flags (4 bits) |
+--------------------------------------------------+
| Restart Time in seconds (12 bits) |
+--------------------------------------------------+
| Address Family Identifier (16 bits) |
+--------------------------------------------------+
| Subsequent Address Family Identifier (8 bits) |
+--------------------------------------------------+
| Flags for Address Family (8 bits) |
+--------------------------------------------------+</pre></div><div><br></div><div>so ,when I set the graceful restart time like 32768.£¬it will cover the gr_flag. Becasue ,in the bgp_write_capabilites() function £¬it first put the gr_time in. Then use "|" to put gr_flags. This will casue the value in gr_time first four bits keep in the gr_flags¡£</div><div><img src="cid:476d2445$1$16f371fd274$Coremail$melissa_cjt$163.com" orgwidth="1147" orgheight="80" data-image="1" style="width: 849px; height: 59px;"></div><div><div> </div><div> put_u16(buf, caps->gr_time);</div><div> buf[0] |= caps->gr_flags;</div></div><div></div><div><br></div><div>Also £¬I have find in RFC 4724£¬it required gr_flag expect the first bit ,the remaining bits are reserved and MUST be set to zero by the sender and ignored by the receiver. gr_time in the configure also can change the remaining bits. Meanwhile, in the bgp_read_capabilites() function, it use "& 0xf0" will remain the wrong 4 bits.</div><div><br></div><div> caps->gr_flags = pos[2] & 0xf0;</div><div><div> caps->gr_time = get_u16(pos + 2) & 0x0fff;</div></div><div><br></div><div>I try this on the bird 2.0.7</div><div> Thanks </div><div> Jingting Chen</div></div><br><br><span title="neteasefooter"><p> </p></span>