0014-Warn-user-of-deprecated-option-defaultmetric.patch 832 B

1234567891011121314151617181920212223242526272829
  1. From 44693fba1884f8e5404fd259e371350ffc8d24be Mon Sep 17 00:00:00 2001
  2. From: "Nelo-T. Wallus" <nelo@wallus.de>
  3. Date: Tue, 5 Jan 2021 12:45:00 +0100
  4. Subject: [PATCH 14/14] Warn user of deprecated option defaultmetric
  5. ---
  6. pppd/options.c | 5 +++++
  7. 1 file changed, 5 insertions(+)
  8. diff --git a/pppd/options.c b/pppd/options.c
  9. index 022f9d9..d7da8c7 100644
  10. --- a/pppd/options.c
  11. +++ b/pppd/options.c
  12. @@ -684,6 +684,11 @@ process_option(option_t *opt, char *cmd, char **argv)
  13. current_option = opt->name;
  14. if ((opt->flags & OPT_PRIVFIX) && privileged_option)
  15. prio += OPRIO_ROOT;
  16. +
  17. + if (current_option == "defaultmetric")
  18. + warn("Option '%s' is deprecated, switch to 'defaultroute-metric'",
  19. + current_option);
  20. +
  21. while (mainopt->flags & OPT_PRIOSUB)
  22. --mainopt;
  23. if (mainopt->flags & OPT_PRIO) {
  24. --
  25. 2.30.0