Hello!

> diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
> index 0c50583..76f0400 100644
> --- a/proto/bgp/bgp.h
> +++ b/proto/bgp/bgp.h
> @@ -50,6 +50,7 @@ struct bgp_config {
>    unsigned error_delay_time_min;     /* Time to wait after an error is 
> detected */
>    unsigned error_delay_time_max;
>    unsigned disable_after_error;              /* Disable the protocol when 
> error is detected */
> +  char interface[16];                        /* Interface to use */

Please do not place arbitrary limits on interface names.

Instead of copying the interface name, you can store a pointer to the string
-- it is allocated from the configuration mempool, which is kept until
reconfiguration.

However, you have to extend bgp_reconfigure() to compare the old and new
interface name.

                                Have a nice fortnight
-- 
Martin `MJ' Mares                          <[email protected]>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
int random(void) { return 4; /* Random number chosen by a fair dice roll. */ }

Reply via email to