RTNH_F_EXTERNAL today is printed as "offload" in iproute2 output. This patch renames the flag to be consistent with what the user sees.
Unified · Split
| @@ -337,7 +337,7 @@ struct rtnexthop { · 336 unmodified lines | ||
| 337 | 337 | #define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ |
| 338 | 338 | #define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ |
| 339 | 339 | #define RTNH_F_ONLINK 4 /* Gateway is forced on link */ |
| 340 | −#define RTNH_F_EXTERNAL 8 /* Route installed externally */ | |
| 340 | +#define RTNH_F_OFFLOAD 8 /* offloaded route */ | |
| 341 | 341 | |
| 342 | 342 | /* Macros to handle hexthops */ |
| 343 | 343 | |
| @@ -1764,7 +1764,7 @@ void fib_table_flush_external(struct fib_table *tb) · 1763 unmodified lines | ||
| 1764 | 1764 | /* record local slen */ |
| 1765 | 1765 | slen = fa->fa_slen; |
| 1766 | 1766 | |
| 1767 | − if (!fi || !(fi->fib_flags & RTNH_F_EXTERNAL)) | |
| 1767 | + if (!fi || !(fi->fib_flags & RTNH_F_OFFLOAD)) | |
| 1768 | 1768 | continue; |
| 1769 | 1769 | |
| 1770 | 1770 | netdev_switch_fib_ipv4_del(n->key, |
| @@ -338,7 +338,7 @@ int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi, · 337 unmodified lines | ||
| 338 | 338 | fi, tos, type, nlflags, |
| 339 | 339 | tb_id); |
| 340 | 340 | if (!err) |
| 341 | − fi->fib_flags |= RTNH_F_EXTERNAL; | |
| 341 | + fi->fib_flags |= RTNH_F_OFFLOAD; | |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | return err; |
| @@ -364,7 +364,7 @@ int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, · 19 unmodified lines | ||
| 364 | 364 | const struct swdev_ops *ops; |
| 365 | 365 | int err = 0; |
| 366 | 366 | |
| 367 | − if (!(fi->fib_flags & RTNH_F_EXTERNAL)) | |
| 367 | + if (!(fi->fib_flags & RTNH_F_OFFLOAD)) | |
| 368 | 368 | return 0; |
| 369 | 369 | |
| 370 | 370 | dev = netdev_switch_get_dev_by_nhs(fi); |
| @@ -376,7 +376,7 @@ int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, · 5 unmodified lines | ||
| 376 | 376 | err = ops->swdev_fib_ipv4_del(dev, htonl(dst), dst_len, |
| 377 | 377 | fi, tos, type, tb_id); |
| 378 | 378 | if (!err) |
| 379 | − fi->fib_flags &= ~RTNH_F_EXTERNAL; | |
| 379 | + fi->fib_flags &= ~RTNH_F_OFFLOAD; | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | return err; |