Commit 32012686d2 for frr

commit 32012686d2b8d8e19ae9da980a91832189fde759
Author: Philippe Guibert <philippe.guibert@6wind.com>
Date:   Mon Oct 12 15:36:25 2026 +0200

    doc: clarify the usage of aigp

    The documentation of "neighbor PEER aigp" does not say whether the
    command adds the AIGP attribute to the advertised routes, nor how a
    route gets this attribute. The documentation of "set aigp-metric" does
    not say what a metric of 0 does.

    "neighbor PEER aigp" only allows the AIGP attribute on the session:
    AIGP_TRANSMIT_ALLOWED() is checked when receiving and when sending the
    attribute, and the attribute is sent only if the route carries it. The
    route gets it from a route-map, or from a neighbor. AIGP_TRANSMIT_ALLOWED()
    is true for every peer that is not eBGP, including confederation peers.
    A metric of 0 keeps the AIGP attribute.

    Fix this by documenting these points.

    Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>

diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst
index 297b4cb165..99d3b53763 100644
--- a/doc/user/bgp.rst
+++ b/doc/user/bgp.rst
@@ -2879,9 +2879,18 @@ Capability Negotiation
 .. clicmd:: neighbor PEER aigp

    Send and receive AIGP attribute for this neighbor. This is valid only for
-   eBGP neighbors.
-
-   Disabled by default. iBGP neighbors have this option enabled implicitly.
+   eBGP neighbors. When disabled, a received AIGP attribute is ignored, and
+   the AIGP attribute is not sent.
+
+   This command does not add the AIGP attribute to the advertised routes: only
+   the routes that already carry it are sent with it. A route gets the AIGP
+   attribute from :clicmd:`set aigp-metric \<igp-metric|(0-4294967295)\>`, or
+   from a neighbor with AIGP enabled. When the nexthop is changed to the local
+   address, the AIGP metric is increased by the IGP metric to the previous
+   nexthop.
+
+   Disabled by default. iBGP and confederation neighbors have this option
+   enabled implicitly.

 .. _bgp-as-path-access-lists:

diff --git a/doc/user/routemap.rst b/doc/user/routemap.rst
index c4fa8336a5..1b3aaab4a4 100644
--- a/doc/user/routemap.rst
+++ b/doc/user/routemap.rst
@@ -346,6 +346,8 @@ Route Map Set Command

    Set the BGP attribute AIGP to a specific value. If ``igp-metric`` is specified,
    then the value is taken from the IGP protocol, otherwise an arbitrary value.
+   A value of 0 is valid: the route carries the AIGP attribute with a metric
+   of 0, which is compared in the best path selection.

 .. clicmd:: set as-path prepend AS_PATH