Browse Source

prefix all symbols that show up in the kernel with ts3init_

pull/1/head
Niels Werensteijn 8 years ago
parent
commit
aa3150a046
  1. 2
      src/siphash24.c
  2. 2
      src/ts3init_cookie.c
  3. 2
      src/ts3init_cookie.h
  4. 6
      src/ts3init_match.c

2
src/siphash24.c

@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
#define TRACE
#endif
int siphash(u8 *out, const u8 *in, u64 inlen, const u8 *k) {
int ts3init_siphash(u8 *out, const u8 *in, u64 inlen, const u8 *k) {
/* "somepseudorandomlygeneratedbytes" */
u64 v0 = 0x736f6d6570736575ULL;
u64 v1 = 0x646f72616e646f6dULL;

2
src/ts3init_cookie.c

@ -62,7 +62,7 @@ static void check_update_seed_cache(time_t time, __u8 index, @@ -62,7 +62,7 @@ static void check_update_seed_cache(time_t time, __u8 index,
crypto_free_hash(desc.tfm);
}
__u8* get_cookie_seed(time_t current_time, __u8 packet_index,
__u8* ts3init_get_cookie_seed(time_t current_time, __u8 packet_index,
struct xt_ts3init_cookie_cache* cache,
const __u8* cookie_seed)
{

2
src/ts3init_cookie.h

@ -12,7 +12,7 @@ struct xt_ts3init_cookie_cache @@ -12,7 +12,7 @@ struct xt_ts3init_cookie_cache
__u8 __attribute__((aligned(8))) seed[SHA512_SIZE*2];
};
__u8* get_cookie_seed(time_t current_time, __u8 packet_index,
__u8* ts3init_get_cookie_seed(time_t current_time, __u8 packet_index,
struct xt_ts3init_cookie_cache* cache,
const __u8* cookie_seed);

6
src/ts3init_match.c

@ -61,7 +61,7 @@ enum @@ -61,7 +61,7 @@ enum
GET_PUZZLE_PAYLOAD_SIZE = 38
};
static const struct ts3_init_header_tag header_tag_signature =
static const struct ts3_init_header_tag ts3init_header_tag_signature =
{ .tag8 = {'T', 'S', '3', 'I', 'N', 'I', 'T', '1'} };
DEFINE_PER_CPU(struct ts3init_cache_t, ts3init_cache);
@ -84,7 +84,7 @@ static inline bool check_header(const struct sk_buff *skb, struct xt_action_para @@ -84,7 +84,7 @@ static inline bool check_header(const struct sk_buff *skb, struct xt_action_para
if (!ts3_header) return false;
if (ts3_header->tag.tag64 != header_tag_signature.tag64) return false;
if (ts3_header->tag.tag64 != ts3init_header_tag_signature.tag64) return false;
if (ts3_header->packet_id != cpu_to_be16(101)) return false;
if (ts3_header->client_id != 0) return false;
if (ts3_header->flags != 0x88) return false;
@ -195,7 +195,7 @@ ts3init_get_puzzle_mt(const struct sk_buff *skb, struct xt_action_param *par) @@ -195,7 +195,7 @@ ts3init_get_puzzle_mt(const struct sk_buff *skb, struct xt_action_param *par)
current_unix_time = cache->unix_time;
cookie_seed = get_cookie_seed(current_unix_time,
cookie_seed = ts3init_get_cookie_seed(current_unix_time,
ts3_header->payload[8], &cache->cookie_cache,
info->cookie_seed);

Loading…
Cancel
Save