From: Paul Mackerras Date: Mon, 1 May 2023 03:29:50 +0000 (+1000) Subject: Merge pull request #417 from enaess/fixes X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=dbd512d8a62489d67a32dbf6c4ec1428cb5df513;hp=0a6757da66f2c4995d7754d93545fa88996d480b;p=ppp.git Merge pull request #417 from enaess/fixes Fixes for #411 and #413 --- diff --git a/configure.ac b/configure.ac index e1acf80..7ee06d3 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,8 @@ AM_COND_IF([LINUX], [ linux/if_ether.h \ linux/if_packet.h \ netinet/if_ether.h \ - netpacket/packet.h])]) + netpacket/packet.h]) + AC_CHECK_TYPES([struct sockaddr_ll], [], [], [#include ])]) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long) diff --git a/pppd/plugins/pppoe/config.h.in b/pppd/plugins/pppoe/config.h.in index d447f5e..d7d61c0 100644 --- a/pppd/plugins/pppoe/config.h.in +++ b/pppd/plugins/pppoe/config.h.in @@ -69,3 +69,5 @@ /* The size of `unsigned short', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT +/* Define to 1 if the system has the type `struct sockaddr_ll'. */ +#undef HAVE_STRUCT_SOCKADDR_LL diff --git a/pppd/plugins/radius/config.c b/pppd/plugins/radius/config.c index 39744fc..e1a4814 100644 --- a/pppd/plugins/radius/config.c +++ b/pppd/plugins/radius/config.c @@ -235,24 +235,28 @@ int rc_read_config(char *filename) switch (option->type) { case OT_STR: - if (set_option_str(filename, line, option, p) < 0) + if (set_option_str(filename, line, option, p) < 0) { fclose(configfd); return (-1); + } break; case OT_INT: - if (set_option_int(filename, line, option, p) < 0) + if (set_option_int(filename, line, option, p) < 0) { fclose(configfd); return (-1); + } break; case OT_SRV: - if (set_option_srv(filename, line, option, p) < 0) + if (set_option_srv(filename, line, option, p) < 0) { fclose(configfd); return (-1); + } break; case OT_AUO: - if (set_option_auo(filename, line, option, p) < 0) + if (set_option_auo(filename, line, option, p) < 0) { fclose(configfd); return (-1); + } break; default: fatal("rc_read_config: impossible case branch!");