Path: blob/main/net-mgmt/chillispot/files/patch-src_chilli.c
16461 views
--- src/chilli.c.orig Mon Dec 26 08:06:46 20051+++ src/chilli.c Mon Dec 26 08:10:01 20052@@ -14,13 +14,14 @@3#include <stdio.h>4#include <string.h>5#include <stdlib.h>6+#include <sys/types.h>7+#include <sys/socket.h>8+#include <netinet/in.h>9#include <arpa/inet.h>10#include <sys/stat.h>11#include <unistd.h>12-#include <sys/socket.h>13#include <net/if.h>14#include <errno.h>15-#include <sys/types.h>1617#if defined(__linux__)18#include <asm/types.h>19@@ -460,13 +461,13 @@20memset(options.uamokmask, 0, sizeof(options.uamokmask));21options.uamoknetlen = 0;22for (numargs = 0; numargs < args_info.uamallowed_given; ++numargs) {23+ char *p1 = NULL;24+ char *p2 = NULL;25+ char *p3 = malloc(strlen(args_info.uamallowed_arg[numargs])+1);26if (options.debug & DEBUG_CONF) {27printf ("Uamallowed #%d: %s\n",28numargs, args_info.uamallowed_arg[numargs]);29}30- char *p1 = NULL;31- char *p2 = NULL;32- char *p3 = malloc(strlen(args_info.uamallowed_arg[numargs])+1);33strcpy(p3, args_info.uamallowed_arg[numargs]);34p1 = p3;35if ((p2 = strchr(p1, ','))) {36@@ -766,14 +767,14 @@37memset(options.macok, 0, sizeof(options.macok));38options.macoklen = 0;39for (numargs = 0; numargs < args_info.macallowed_given; ++numargs) {40- if (options.debug & DEBUG_CONF) {41- printf ("Macallowed #%d: %s\n", numargs,42- args_info.macallowed_arg[numargs]);43- }44char *p1 = NULL;45char *p2 = NULL;46char *p3 = malloc(strlen(args_info.macallowed_arg[numargs])+1);47int i;48+ if (options.debug & DEBUG_CONF) {49+ printf ("Macallowed #%d: %s\n", numargs,50+ args_info.macallowed_arg[numargs]);51+ }52strcpy(p3, args_info.macallowed_arg[numargs]);53p1 = p3;54if ((p2 = strchr(p1, ','))) {555657