]> git.ozlabs.org Git - ppp.git/commitdiff
Merge pull request #417 from enaess/fixes
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 1 May 2023 03:29:50 +0000 (13:29 +1000)
committerGitHub <noreply@github.com>
Mon, 1 May 2023 03:29:50 +0000 (13:29 +1000)
Fixes for #411 and #413

configure.ac
pppd/plugins/pppoe/config.h.in
pppd/plugins/radius/config.c

index e1acf8064c7a52fef7fe59dfb5ad65fb6456bdb9..7ee06d3b513a9a1d539033b3bd6ed26a0633c5c1 100644 (file)
@@ -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 <linux/if_packet.h>])])
 
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(unsigned long)
index d447f5e891cb1e32714c335fc4916a3fd7ea578e..d7d61c01c0414e3fd10b43ec7f6e8c8e6770e110 100644 (file)
@@ -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
index 39744fca12f04730a4e69f9e8f293f258b63162e..e1a4814873488945c0f60febb660996005f37464 100644 (file)
@@ -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!");