diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2024-02-16 14:54:17 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2024-02-16 15:00:03 +0100 |
commit | 5c04f0e2354ff0cca9b1479e68882b72755f3aab (patch) | |
tree | 4cb7108c24bf8015e4e0e99ce8145c7a9587c68e /sysdep/linux | |
parent | e68363909cb9733c1bf55fff80a8b034e4111849 (diff) |
Netlink: Fix spelling of krt_ssthresh / krt_lock_ssthresh
BIRD route attribute for RTAX_SSTHRESH metric was krt_sstresh instead of
krt_ssthresh. Fix that and keep old name as an depreacted alias.
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/krt-sys.h | 2 | ||||
-rw-r--r-- | sysdep/linux/netlink.Y | 15 | ||||
-rw-r--r-- | sysdep/linux/netlink.c | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/sysdep/linux/krt-sys.h b/sysdep/linux/krt-sys.h index 484c90f8..2db32ddd 100644 --- a/sysdep/linux/krt-sys.h +++ b/sysdep/linux/krt-sys.h @@ -54,7 +54,7 @@ static inline struct ifa * kif_get_primary_ip(struct iface *i UNUSED) { return N #define EA_KRT_WINDOW EA_CODE(PROTOCOL_KERNEL, 0x23) #define EA_KRT_RTT EA_CODE(PROTOCOL_KERNEL, 0x24) #define EA_KRT_RTTVAR EA_CODE(PROTOCOL_KERNEL, 0x25) -#define EA_KRT_SSTRESH EA_CODE(PROTOCOL_KERNEL, 0x26) +#define EA_KRT_SSTHRESH EA_CODE(PROTOCOL_KERNEL, 0x26) #define EA_KRT_CWND EA_CODE(PROTOCOL_KERNEL, 0x27) #define EA_KRT_ADVMSS EA_CODE(PROTOCOL_KERNEL, 0x28) #define EA_KRT_REORDERING EA_CODE(PROTOCOL_KERNEL, 0x29) diff --git a/sysdep/linux/netlink.Y b/sysdep/linux/netlink.Y index 60ddfa96..9c820da9 100644 --- a/sysdep/linux/netlink.Y +++ b/sysdep/linux/netlink.Y @@ -12,16 +12,19 @@ CF_DECLS CF_KEYWORDS(KERNEL, TABLE, METRIC, NETLINK, RX, BUFFER, KRT_PREFSRC, KRT_REALM, KRT_SCOPE, KRT_MTU, KRT_WINDOW, - KRT_RTT, KRT_RTTVAR, KRT_SSTRESH, KRT_CWND, KRT_ADVMSS, KRT_REORDERING, + KRT_RTT, KRT_RTTVAR, KRT_SSTHRESH, KRT_CWND, KRT_ADVMSS, KRT_REORDERING, KRT_HOPLIMIT, KRT_INITCWND, KRT_RTO_MIN, KRT_INITRWND, KRT_QUICKACK, KRT_CONGCTL, KRT_FASTOPEN_NO_COOKIE) CF_KEYWORDS(KRT_LOCK_MTU, KRT_LOCK_WINDOW, KRT_LOCK_RTT, KRT_LOCK_RTTVAR, - KRT_LOCK_SSTRESH, KRT_LOCK_CWND, KRT_LOCK_ADVMSS, KRT_LOCK_REORDERING, + KRT_LOCK_SSTHRESH, KRT_LOCK_CWND, KRT_LOCK_ADVMSS, KRT_LOCK_REORDERING, KRT_LOCK_HOPLIMIT, KRT_LOCK_INITCWND, KRT_LOCK_RTO_MIN, KRT_LOCK_INITRWND, KRT_LOCK_QUICKACK, KRT_LOCK_CONGCTL, KRT_LOCK_FASTOPEN_NO_COOKIE, KRT_FEATURE_ECN, KRT_FEATURE_ALLFRAG) +/* Deprecated names for backward compatiblity */ +CF_KEYWORDS(KRT_SSTRESH, KRT_LOCK_SSTRESH) + CF_GRAMMAR @@ -41,7 +44,9 @@ dynamic_attr: KRT_MTU { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_MTU dynamic_attr: KRT_WINDOW { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_WINDOW); } ; dynamic_attr: KRT_RTT { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_RTT); } ; dynamic_attr: KRT_RTTVAR { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_RTTVAR); } ; -dynamic_attr: KRT_SSTRESH { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_SSTRESH); } ; +dynamic_attr: KRT_SSTHRESH { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_SSTHRESH); } ; +dynamic_attr: KRT_SSTRESH { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_SSTHRESH); + cf_warn("Attribute krt_sstresh is deprecated (typo), use krt_ssthresh"); } ; dynamic_attr: KRT_CWND { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_CWND); } ; dynamic_attr: KRT_ADVMSS { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_ADVMSS); } ; dynamic_attr: KRT_REORDERING { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_KRT_REORDERING); } ; @@ -59,7 +64,9 @@ dynamic_attr: KRT_LOCK_MTU { $$ = f_new_dynamic_attr_bit(2, T_BOOL, EA_KRT_LOCK) dynamic_attr: KRT_LOCK_WINDOW { $$ = f_new_dynamic_attr_bit(3, T_BOOL, EA_KRT_LOCK); } ; dynamic_attr: KRT_LOCK_RTT { $$ = f_new_dynamic_attr_bit(4, T_BOOL, EA_KRT_LOCK); } ; dynamic_attr: KRT_LOCK_RTTVAR { $$ = f_new_dynamic_attr_bit(5, T_BOOL, EA_KRT_LOCK); } ; -dynamic_attr: KRT_LOCK_SSTRESH { $$ = f_new_dynamic_attr_bit(6, T_BOOL, EA_KRT_LOCK); } ; +dynamic_attr: KRT_LOCK_SSTHRESH { $$ = f_new_dynamic_attr_bit(6, T_BOOL, EA_KRT_LOCK); } ; +dynamic_attr: KRT_LOCK_SSTRESH { $$ = f_new_dynamic_attr_bit(6, T_BOOL, EA_KRT_LOCK); + cf_warn("Attribute krt_lock_sstresh is deprecated (typo), use krt_lock_ssthresh"); } ; dynamic_attr: KRT_LOCK_CWND { $$ = f_new_dynamic_attr_bit(7, T_BOOL, EA_KRT_LOCK); } ; dynamic_attr: KRT_LOCK_ADVMSS { $$ = f_new_dynamic_attr_bit(8, T_BOOL, EA_KRT_LOCK); } ; dynamic_attr: KRT_LOCK_REORDERING { $$ = f_new_dynamic_attr_bit(9, T_BOOL, EA_KRT_LOCK); } ; diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index 1ace6c27..6b4fc80c 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -2148,7 +2148,7 @@ krt_sys_copy_config(struct krt_config *d, struct krt_config *s) } static const char *krt_metrics_names[KRT_METRICS_MAX] = { - NULL, "lock", "mtu", "window", "rtt", "rttvar", "sstresh", "cwnd", "advmss", + NULL, "lock", "mtu", "window", "rtt", "rttvar", "ssthresh", "cwnd", "advmss", "reordering", "hoplimit", "initcwnd", "features", "rto_min", "initrwnd", "quickack", "congctl", "fastopen_no_cookie" }; |