Changeset 24495


Ignore:
Timestamp:
2010-12-11T20:43:44+01:00 (7 years ago)
Author:
jow
Message:

[packages] chillispot: fix compilation after autoreconf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/chillispot/patches/150-chillispot-rmtctrl.patch

    r19588 r24495  
    1 diff -Nur chillispot-1.1.0.orig/src/chilli.c chillispot-1.1.0/src/chilli.c 
    2 --- chillispot-1.1.0.orig/src/chilli.c  2009-08-11 15:10:56.000000000 -0300 
    3 +++ chillispot-1.1.0/src/chilli.c       2009-08-13 13:17:24.000000000 -0300 
     1--- a/src/chilli.c 
     2+++ b/src/chilli.c 
    43@@ -102,6 +102,7 @@ 
    54 #include "dhcp.h" 
     
    109 struct options_t options; 
    1110  
    12 @@ -127,6 +128,12 @@ 
     11@@ -127,6 +128,12 @@ static int do_sighup = 0; 
    1312 /* Forward declarations */ 
    1413 int static acct_req(struct app_conn_t *conn, int status_type); 
     
    2322 /* Fireman catches falling childs and eliminates zombies */ 
    2423 void static fireman(int signum) {  
    25 @@ -180,19 +187,18 @@ 
     24@@ -180,19 +187,18 @@ int static leaky_bucket(struct app_conn_ 
    2625   struct timeval timenow; 
    2726   uint64_t timediff; /* In microseconds */ 
     
    4847     if (conn->bucketup > ((timediff * conn->bandwidthmaxup)/8000000)) { 
    4948       conn->bucketup -= (timediff * conn->bandwidthmaxup) / 8000000; 
    50 @@ -200,9 +206,9 @@ 
     49@@ -200,9 +206,9 @@ int static leaky_bucket(struct app_conn_ 
    5150     else { 
    5251       conn->bucketup = 0; 
     
    6059     } 
    6160     else { 
    62 @@ -217,9 +223,10 @@ 
     61@@ -217,9 +223,10 @@ int static leaky_bucket(struct app_conn_ 
    6362     else { 
    6463       conn->bucketdown = 0; 
     
    7271     } 
    7372     else { 
    74 @@ -233,6 +240,7 @@ 
     73@@ -233,6 +240,7 @@ int static leaky_bucket(struct app_conn_ 
    7574 } 
    7675 #endif /* ifndef NO_LEAKY_BUCKET */ 
     
    8079  
    8180 int set_env(char *name, char *value, int len, struct in_addr *addr, 
    82 @@ -550,7 +558,7 @@ 
     81@@ -550,7 +558,7 @@ int static process_options(int argc, cha 
    8382     return -1; 
    8483   } 
     
    8988            "Failed to parse configuration file: %s!",  
    9089            args_info.conf_arg); 
    91 @@ -1056,7 +1064,21 @@ 
     90@@ -1056,7 +1064,21 @@ int static process_options(int argc, cha 
    9291                       strlen(args_info.macallowed_arg[numargs])))  
    9392       return -1; 
     
    112111   /* foreground                                                   */ 
    113112   /* If flag not given run as a daemon                            */ 
    114 @@ -1095,7 +1117,6 @@ 
     113@@ -1095,7 +1117,6 @@ void static reprocess_options(int argc,  
    115114     memcpy(&options, &options2, sizeof(options)); 
    116115     return; 
     
    120119   /* fg, conf and statedir are not stored in options */ 
    121120   options.net = options2.net; /* net */ 
    122 @@ -1123,6 +1144,13 @@ 
     121@@ -1123,6 +1144,13 @@ void static reprocess_options(int argc,  
    123122   options.eapolenable = options2.eapolenable; /* eapolenable */ 
    124123   options.pidfile = options2.pidfile; /* pidfile */ 
     
    134133   (void) dhcp_set(dhcp, (options.debug & DEBUG_DHCP), 
    135134                  options.uamserver, options.uamserverlen, options.uamanydns, 
    136 @@ -3099,9 +3127,8 @@ 
     135@@ -3099,9 +3127,8 @@ int cb_radius_auth_conf(struct radius_t  
    137136       appconn->bucketupsize = BUCKET_SIZE_MIN; 
    138137 #endif 
     
    145144   /* Bandwidth down */ 
    146145   if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC, 
    147 @@ -3116,9 +3143,8 @@ 
     146@@ -3116,9 +3143,8 @@ int cb_radius_auth_conf(struct radius_t  
    148147       appconn->bucketdownsize = BUCKET_SIZE_MIN; 
    149148 #endif 
     
    156155 #ifdef RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_UP 
    157156   /* Bandwidth up */ 
    158 @@ -3623,7 +3649,7 @@ 
     157@@ -3623,7 +3649,7 @@ int cb_dhcp_data_ind(struct dhcp_conn_t  
    159158     appconn->input_octets +=len; 
    160159 #ifndef NO_LEAKY_BUCKET 
     
    165164 #endif /* ifndef NO_LEAKY_BUCKET */ 
    166165   } 
    167 @@ -3889,6 +3915,10 @@ 
     166@@ -3889,6 +3915,10 @@ int main(int argc, char **argv) 
    168167   struct sigaction act; 
    169168   struct itimerval itval; 
     
    176175   /*openlog(PACKAGE, LOG_PID, LOG_DAEMON);*/ 
    177176   openlog(PACKAGE, (LOG_PID | LOG_PERROR), LOG_DAEMON); 
    178 @@ -4046,6 +4076,8 @@ 
     177@@ -4046,6 +4076,8 @@ int main(int argc, char **argv) 
    179178   if (options.debug)  
    180179     printf("Waiting for client request...\n"); 
     
    185184   /******************************************************************/ 
    186185   /* Main select loop                                               */ 
    187 @@ -4053,6 +4085,8 @@ 
     186@@ -4053,6 +4085,8 @@ int main(int argc, char **argv) 
    188187  
    189188   while (keep_going) { 
     
    194193       /*if (options.debug) printf("Do timeouts!\n");*/ 
    195194       (void) radius_timeout(radius); 
    196 @@ -4178,3 +4212,487 @@ 
     195@@ -4178,3 +4212,487 @@ int main(int argc, char **argv) 
    197196   return 0; 
    198197    
     
    682681+       rslt += rmtctrl_write_msg(client,MSG_END,0, "End of configuration\n"); 
    683682+} 
    684 diff -Nur chillispot-1.1.0.orig/src/chilli.h chillispot-1.1.0/src/chilli.h 
    685 --- chillispot-1.1.0.orig/src/chilli.h  2009-08-11 15:10:56.000000000 -0300 
    686 +++ chillispot-1.1.0/src/chilli.h       2009-08-12 13:52:24.000000000 -0300 
     683--- a/src/chilli.h 
     684+++ b/src/chilli.h 
    687685@@ -50,8 +50,8 @@ 
    688686 /* If the constants below are defined packets which have been dropped 
     
    705703 /* Time length of leaky bucket in milliseconds */ 
    706704 /* Bucket size = BUCKET_TIME * Bandwidth-Max radius attribute */ 
    707 @@ -194,12 +194,14 @@ 
     705@@ -194,12 +194,14 @@ struct app_conn_t { 
    708706   struct in_addr dns1; 
    709707   struct in_addr dns2; 
     
    724722   /* UAM information */ 
    725723   uint8_t uamchal[REDIR_MD5LEN]; 
    726 @@ -305,6 +307,11 @@ 
     724@@ -305,6 +307,11 @@ struct options_t { 
    727725   int macoklen;                   /* Number of MAC addresses */ 
    728726   char* macsuffix;               /* Suffix to add to MAC address */ 
     
    736734  
    737735 extern struct app_conn_t connection[APP_NUM_CONN]; 
    738 Los ficheros binarios chillispot-1.1.0.orig/src/chilli.o y chillispot-1.1.0/src/chilli.o son distintos 
    739 diff -Nur chillispot-1.1.0.orig/src/cmdline.c chillispot-1.1.0/src/cmdline.c 
    740 --- chillispot-1.1.0.orig/src/cmdline.c 2006-09-24 14:48:26.000000000 -0300 
    741 +++ chillispot-1.1.0/src/cmdline.c      2009-08-11 16:17:58.000000000 -0300 
    742 @@ -113,6 +113,11 @@ 
     736--- a/src/cmdline.c 
     737+++ b/src/cmdline.c 
     738@@ -113,6 +113,11 @@ void clear_given (struct gengetopt_args_ 
    743739   args_info->macallowed_given = 0 ; 
    744740   args_info->macsuffix_given = 0 ; 
     
    752748  
    753749 static 
    754 @@ -216,7 +221,19 @@ 
     750@@ -216,7 +221,19 @@ void clear_args (struct gengetopt_args_i 
    755751   args_info->macsuffix_orig = NULL; 
    756752   args_info->macpasswd_arg = gengetopt_strdup ("password"); 
     
    773769  
    774770 void 
    775 @@ -284,7 +301,12 @@ 
     771@@ -284,7 +301,12 @@ cmdline_parser_print_help (void) 
    776772   printf("%s\n","      --macauth                 Authenticate based on MAC address  \n                                  (default=off)"); 
    777773   printf("%s\n","      --macallowed=STRING       List of allowed MAC addresses"); 
     
    787783 } 
    788784  
    789 @@ -675,6 +697,11 @@ 
     785@@ -675,6 +697,11 @@ cmdline_parser_release (struct gengetopt 
    790786       free (args_info->uamport_orig); /* free previous argument */ 
    791787       args_info->uamport_orig = 0; 
     
    799795     { 
    800796       for (i = 0; i < args_info->uamallowed_given; ++i) 
    801 @@ -739,6 +766,34 @@ 
     797@@ -739,6 +766,34 @@ cmdline_parser_release (struct gengetopt 
    802798       free (args_info->macpasswd_orig); /* free previous argument */ 
    803799       args_info->macpasswd_orig = 0; 
     
    834830   clear_given (args_info); 
    835831 } 
    836 @@ -1109,7 +1164,41 @@ 
     832@@ -1109,7 +1164,41 @@ cmdline_parser_file_save(const char *fil 
    837833       fprintf(outfile, "%s\n", "macpasswd"); 
    838834     } 
     
    877873  
    878874   i = EXIT_SUCCESS; 
    879 @@ -1221,6 +1310,7 @@ 
     875@@ -1221,6 +1310,7 @@ cmdline_parser_internal (int argc, char  
    880876 { 
    881877   int c;       /* Character of the parsed option.  */ 
     
    885881   int i;        /* Counter */ 
    886882  
    887 @@ -1299,6 +1389,11 @@ 
     883@@ -1299,6 +1389,11 @@ cmdline_parser_internal (int argc, char  
    888884         { "macallowed",        1, NULL, 0 }, 
    889885         { "macsuffix", 1, NULL, 0 }, 
     
    897893       }; 
    898894  
    899 @@ -1380,8 +1475,6 @@ 
     895@@ -1380,8 +1475,6 @@ cmdline_parser_internal (int argc, char  
    900896             free (args_info->net_orig); /* free previous string */ 
    901897           args_info->net_orig = gengetopt_strdup (optarg); 
     
    906902           /* Which modules to print debug messages for.  */ 
    907903           if (strcmp (long_options[option_index].name, "debugfacility") == 0) 
    908 @@ -2273,7 +2366,93 @@ 
     904@@ -2273,7 +2366,93 @@ cmdline_parser_internal (int argc, char  
    909905               free (args_info->macpasswd_orig); /* free previous string */ 
    910906             args_info->macpasswd_orig = gengetopt_strdup (optarg); 
     
    1001997         case '?':      /* Invalid option.  */ 
    1002998           /* `getopt_long' already printed an error message.  */ 
    1003 diff -Nur chillispot-1.1.0.orig/src/cmdline.ggo chillispot-1.1.0/src/cmdline.ggo 
    1004 --- chillispot-1.1.0.orig/src/cmdline.ggo       2006-09-24 14:48:26.000000000 -0300 
    1005 +++ chillispot-1.1.0/src/cmdline.ggo    2009-08-11 16:17:58.000000000 -0300 
    1006 @@ -119,3 +119,12 @@ 
     999--- a/src/cmdline.ggo 
     1000+++ b/src/cmdline.ggo 
     1001@@ -119,3 +119,12 @@ option "macallowed"  - "List of allowed  
    10071002 option "macsuffix"   - "Suffix to add to the MAC address" string no 
    10081003 option "macpasswd"   - "Password used when performing MAC authentication" string default="password" no 
     
    10171012+option "bandwidthmaxdown" - "Default bandwidth control to apply when account don't have setting" int no 
    10181013+ 
    1019 diff -Nur chillispot-1.1.0.orig/src/cmdline.h chillispot-1.1.0/src/cmdline.h 
    1020 --- chillispot-1.1.0.orig/src/cmdline.h 2006-09-24 14:48:26.000000000 -0300 
    1021 +++ chillispot-1.1.0/src/cmdline.h      2009-08-11 16:17:58.000000000 -0300 
    1022 @@ -122,6 +122,17 @@ 
     1014--- a/src/cmdline.h 
     1015+++ b/src/cmdline.h 
     1016@@ -122,6 +122,17 @@ struct gengetopt_args_info 
    10231017   char * macsuffix_orig;       /* Suffix to add to the MAC address original value given at command line.  */ 
    10241018   char * macpasswd_arg;        /* Password used when performing MAC authentication (default='password').  */ 
     
    10381032   int help_given ;     /* Whether help was given.  */ 
    10391033   int version_given ;  /* Whether version was given.  */ 
    1040 @@ -177,7 +188,11 @@ 
     1034@@ -177,7 +188,11 @@ struct gengetopt_args_info 
    10411035   unsigned int macallowed_given ;      /* Whether macallowed was given.  */ 
    10421036   int macsuffix_given ;        /* Whether macsuffix was given.  */ 
     
    10511045  
    10521046 int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info); 
    1053 diff -Nur chillispot-1.1.0.orig/src/Makefile chillispot-1.1.0/src/Makefile 
    1054 --- chillispot-1.1.0.orig/src/Makefile  2009-08-11 15:11:28.000000000 -0300 
    1055 +++ chillispot-1.1.0/src/Makefile       2009-08-11 16:18:32.000000000 -0300 
    1056 @@ -54,7 +54,7 @@ 
     1047--- a/src/Makefile 
     1048+++ b/src/Makefile 
     1049@@ -54,7 +54,7 @@ PROGRAMS = $(sbin_PROGRAMS) 
    10571050 am_chilli_OBJECTS = chilli.$(OBJEXT) tun.$(OBJEXT) cmdline.$(OBJEXT) \ 
    10581051        ippool.$(OBJEXT) radius.$(OBJEXT) md5.$(OBJEXT) \ 
     
    10631056 chilli_LDADD = $(LDADD) 
    10641057 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 
    1065 @@ -172,7 +172,7 @@ 
     1058@@ -172,7 +172,7 @@ target_alias =  
    10661059  
    10671060 # add -pg to enable gprof 
     
    10721065  
    10731066 .SUFFIXES: 
    1074 diff -Nur chillispot-1.1.0.orig/src/Makefile.in chillispot-1.1.0/src/Makefile.in 
    1075 --- chillispot-1.1.0.orig/src/Makefile.in       2006-09-24 16:34:58.000000000 -0300 
    1076 +++ chillispot-1.1.0/src/Makefile.in    2009-08-11 16:17:58.000000000 -0300 
    1077 @@ -54,7 +54,7 @@ 
     1067--- a/src/Makefile.in 
     1068+++ b/src/Makefile.in 
     1069@@ -54,7 +54,7 @@ PROGRAMS = $(sbin_PROGRAMS) 
    10781070 am_chilli_OBJECTS = chilli.$(OBJEXT) tun.$(OBJEXT) cmdline.$(OBJEXT) \ 
    10791071        ippool.$(OBJEXT) radius.$(OBJEXT) md5.$(OBJEXT) \ 
     
    10841076 chilli_LDADD = $(LDADD) 
    10851077 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 
    1086 @@ -172,7 +172,7 @@ 
     1078@@ -172,7 +172,7 @@ target_alias = @target_alias@ 
    10871079  
    10881080 # add -pg to enable gprof 
     
    10931085  
    10941086 .SUFFIXES: 
    1095 diff -Nur chillispot-1.1.0.orig/src/remotectrl.c chillispot-1.1.0/src/remotectrl.c 
    1096 --- chillispot-1.1.0.orig/src/remotectrl.c      1969-12-31 21:00:00.000000000 -0300 
    1097 +++ chillispot-1.1.0/src/remotectrl.c   2009-08-11 16:17:58.000000000 -0300 
     1087--- /dev/null 
     1088+++ b/src/remotectrl.c 
    10981089@@ -0,0 +1,340 @@ 
    10991090+#include <stdio.h>           
     
    14371428+} 
    14381429+ 
    1439 diff -Nur chillispot-1.1.0.orig/src/remotectrl.h chillispot-1.1.0/src/remotectrl.h 
    1440 --- chillispot-1.1.0.orig/src/remotectrl.h      1969-12-31 21:00:00.000000000 -0300 
    1441 +++ chillispot-1.1.0/src/remotectrl.h   2009-08-11 16:17:58.000000000 -0300 
     1430--- /dev/null 
     1431+++ b/src/remotectrl.h 
    14421432@@ -0,0 +1,86 @@ 
    14431433+#include <stdarg.h> 
     
    15271517+ 
    15281518+#endif /* !_RMTCTRL_H */ 
    1529 Los ficheros binarios chillispot-1.1.0.orig/src/remotectrl.o y chillispot-1.1.0/src/remotectrl.o son distintos 
     1519--- a/src/Makefile.am 
     1520+++ b/src/Makefile.am 
     1521@@ -3,7 +3,7 @@ sbin_PROGRAMS = chilli 
     1522 # add -pg to enable gprof 
     1523 AM_CFLAGS = -D_GNU_SOURCE -fno-builtin -DSBINDIR='"$(sbindir)"'  
     1524  
     1525-chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h 
     1526+chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h remotectrl.c remotectrl.h 
     1527  
     1528 # chilli_LDFLAGS = -lcrypt 
     1529  
Note: See TracChangeset for help on using the changeset viewer.