On Wed, Aug 5, 2009 at 12:35 AM, Evgeny
Yurchenko<[email protected]> wrote:
> Hi!
> 1) I find it a little bit inconvenient that you can not add a neighbor
> when you do not have any group configured. Suppose I want to add just
> two neighbors without messing with groups set up.
> This small thing solves it:
> # diff -rub openbgpd_neighbors.xml.bak openbgpd_neighbors.xml
> --- openbgpd_neighbors.xml.bak  2009-07-22 21:31:13.000000000 +0000
> +++ openbgpd_neighbors.xml      2009-08-05 04:11:06.000000000 +0000
> @@ -171,6 +171,11 @@
>                                $counter++;
>                        }
>                }
> +               else{
> +                       $newoptions['option'][0]['name'] = "";
> +                       $newoptions['option'][0]['value'] = "";
> +                       $pkg['fields']['field'][2]['options'] =
> $newoptions;
> +               }
>        </custom_php_command_before_form>
>        <custom_php_deinstall_command>
>        </custom_php_deinstall_command>
>
>
> 2) Cosmetic but may be you would wish to implement it. Neighbors not
> belonging to any group not aligned properly:
> group "G1" {
>        remote-as 11
>        neighbor 1.1.1.1 {
>                descr "N1"
>                announce all
>                remote-as 1
>        }
> }
>        neighbor 2.2.2.2 {
>                descr "N2"
>                announce all
>                holdtime 300
>                remote-as 2
>        }
>
>
> This small patch
> # diff -rub openbgpd.inc.bak openbgpd.inc
> --- openbgpd.inc.bak    2009-07-22 21:31:13.000000000 +0000
> +++ openbgpd.inc        2009-08-05 03:31:14.000000000 +0000
> @@ -103,14 +103,14 @@
>       foreach($openbgpd_neighbors as $neighbor) {
>         $used_this_item = false;
>         if($neighbor['groupname'] == "") {
> -          $conffile .= "       neighbor {$neighbor['neighbor']} {\n";
> +          $conffile .= "neighbor {$neighbor['neighbor']} {\n";
>           $conffile .= "               descr
> \"{$neighbor['descr']}\"\n";
>           $used_this_item = true;
>           foreach($neighbor['row'] as $row) {
>             $conffile .= "             {$row['paramaters']}
> {$row['parmvalue']} \n";
>           }
>           if($used_this_item)
> -            $conffile .= "     }\n";
> +            $conffile .= "}\n";
>         }
>       }
>       if($used_this_item)
>
> .... makes it more intuitive (at least for me)
> group "G1" {
>        remote-as 11
>        neighbor 1.1.1.1 {
>                descr "N1"
>                announce all
>                remote-as 1
>        }
> }
> neighbor 2.2.2.2 {
>       descr "N2"
>       announce all
>       holdtime 300
>       remote-as 2
> }
>
> Eugene

Thanks, I commited this.

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Commercial support available - https://portal.pfsense.org

Reply via email to