← Commit list

58adc7b52

Denys Vlasenko
Denys Vlasenko
2025-07-01
SUCCESS Duration: 158s

Subject

ip route: make cache printing a bit more similar to upstream

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/libiproute/iproute.c+7 -9
@@ -302,24 +302,22 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
printf("notify ");
}
- if (r->rtm_family == AF_INET6) {
- struct rta_cacheinfo *ci = NULL;
- if (tb[RTA_CACHEINFO]) {
- ci = RTA_DATA(tb[RTA_CACHEINFO]);
- }
- if ((r->rtm_flags & RTM_F_CLONED) || (ci && ci->rta_expires)) {
+ if (r->rtm_family == AF_INET || r->rtm_family == AF_INET6) {
+ if (r->rtm_family == AF_INET) {
if (r->rtm_flags & RTM_F_CLONED) {
printf("%c cache ", _SL_);
+ /* upstream: print_cache_flags() prints more here */
}
+ }
+ if (tb[RTA_CACHEINFO]) {
+ struct rta_cacheinfo *ci = RTA_DATA(tb[RTA_CACHEINFO]);
if (ci->rta_expires) {
printf(" expires %dsec", ci->rta_expires / get_hz());
}
if (ci->rta_error != 0) {
printf(" error %d", ci->rta_error);
}
- } else if (ci) {
- if (ci->rta_error != 0)
- printf(" error %d", ci->rta_error);
+ /* upstream: print_rta_cacheinfo() prints more here */
}
}
if (tb[RTA_IIF] && G_filter.iif == 0) {