]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: correct one comment about ethtool ioctl
authoranlan_cs <vic.lan@pica8.com>
Tue, 9 Aug 2022 05:06:47 +0000 (01:06 -0400)
committeranlan_cs <vic.lan@pica8.com>
Tue, 9 Aug 2022 05:55:31 +0000 (01:55 -0400)
`get_iflink_speed()` uses ioctl to get speed, not ip address. Additionally
adjust format for another one comment line.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
zebra/if_netlink.c

index 7a4e1304bd6ea2832a0fe9df589e8ceb00148be2..c7e7443a1b7a18862f65848ebf05a0c0819c7e93 100644 (file)
@@ -423,7 +423,7 @@ static uint32_t get_iflink_speed(struct interface *interface, int *error)
        ecmd.cmd = ETHTOOL_GSET; /* ETHTOOL_GLINK */
        ifdata.ifr_data = (caddr_t)&ecmd;
 
-       /* use ioctl to get IP address of an interface */
+       /* use ioctl to get speed of an interface */
        frr_with_privs(&zserv_privs) {
                sd = vrf_socket(PF_INET, SOCK_DGRAM, IPPROTO_IP,
                                interface->vrf->vrf_id, NULL);
@@ -436,7 +436,7 @@ static uint32_t get_iflink_speed(struct interface *interface, int *error)
                                *error = -1;
                        return 0;
                }
-       /* Get the current link state for the interface */
+               /* Get the current link state for the interface */
                rc = vrf_ioctl(interface->vrf->vrf_id, sd, SIOCETHTOOL,
                               (char *)&ifdata);
        }