Skip to content

Commit

Permalink
fix a problem with error handling in bandwidth iptables module, shoul…
Browse files Browse the repository at this point in the history
…d fix some problems observed with quotas/bandwidth monitor on ar71xx systems
  • Loading branch information
ericpaulbishop committed Nov 22, 2010
1 parent a8d39ff commit 6cd8d0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -336,7 +336,7 @@ static int parse( int c,



static void print_bandwidth_args( struct ipt_bandwidth_info* info )
static void print_bandwidth_args( struct ipt_bandwidth_info* info )
{
if(info->cmp == BANDWIDTH_CHECK)
{
Expand Down
4 changes: 2 additions & 2 deletions netfilter-match-modules/bandwidth/module/ipt_bandwidth.c
Expand Up @@ -1352,7 +1352,7 @@ static char add_ip_block( uint32_t ip,
uint32_t buffer_length
);
static void parse_get_request(unsigned char* request_buffer, get_request* parsed_request);
static int handle_get_failure(int ret_value, int unlock_user_sem, int unlock_bandwidth_spin, int error_code, unsigned char* out_buffer, unsigned char* free_buffer );
static int handle_get_failure(int ret_value, int unlock_user_sem, int unlock_bandwidth_spin, unsigned char error_code, unsigned char* out_buffer, unsigned char* free_buffer );


/*
Expand Down Expand Up @@ -1509,7 +1509,7 @@ static char add_ip_block( uint32_t ip,
* convenience method for cleaning crap up after failed malloc or other
* error that we can't recover from in get function
*/
static int handle_get_failure(int ret_value, int unlock_user_sem, int unlock_bandwidth_spin, int error_code, unsigned char* out_buffer, unsigned char* free_buffer )
static int handle_get_failure(int ret_value, int unlock_user_sem, int unlock_bandwidth_spin, unsigned char error_code, unsigned char* out_buffer, unsigned char* free_buffer )
{
copy_to_user(out_buffer, &error_code, 1);
if( free_buffer != NULL ) { kfree(free_buffer); }
Expand Down

0 comments on commit 6cd8d0f

Please sign in to comment.