mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-12-22 17:01:46 +00:00
commit
b86545adfa
@ -658,7 +658,7 @@ void igw_order(inet_gw **igws, int *igws_counter, inet_gw **my_igws, int level)
|
||||
if(!igws_counter[level] || !igws[level])
|
||||
return;
|
||||
|
||||
new_head=clist_qsort(igws[level], igws_counter[level], igw_cmp);
|
||||
clist_qsort(new_head, igws[level], igws_counter[level], igw_cmp);
|
||||
|
||||
igw=new_head;
|
||||
list_for(igw) {
|
||||
|
@ -27,11 +27,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <asm/bitops.h>
|
||||
#include <asm/types.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/sendfile.h>
|
||||
|
30
src/libiptc/ipt_CONNMARK.h
Normal file
30
src/libiptc/ipt_CONNMARK.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef _IPT_CONNMARK_H_target
|
||||
#define _IPT_CONNMARK_H_target
|
||||
|
||||
/* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com>
|
||||
* by Henrik Nordstrom <hno@marasystems.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
enum {
|
||||
IPT_CONNMARK_SET = 0,
|
||||
IPT_CONNMARK_SAVE,
|
||||
IPT_CONNMARK_RESTORE
|
||||
};
|
||||
|
||||
struct ipt_connmark_target_info {
|
||||
#ifdef KERNEL_64_USERSPACE_32
|
||||
unsigned long long mark;
|
||||
unsigned long long mask;
|
||||
#else
|
||||
unsigned long mark;
|
||||
unsigned long mask;
|
||||
#endif
|
||||
u_int8_t mode;
|
||||
};
|
||||
|
||||
#endif /*_IPT_CONNMARK_H_target*/
|
@ -5,7 +5,12 @@
|
||||
#ifndef _IPT_CONNTRACK_H
|
||||
#define _IPT_CONNTRACK_H
|
||||
|
||||
#if 0
|
||||
#include <linux/netfilter_ipv4/ip_conntrack.h>
|
||||
#else
|
||||
#include <linux/netfilter/nf_conntrack_common.h>
|
||||
#include <linux/netfilter/nf_conntrack_tuple_common.h>
|
||||
#endif
|
||||
|
||||
/* backwards compatibility crap. only exists in userspace - HW */
|
||||
#include <linux/version.h>
|
||||
|
@ -59,12 +59,14 @@ static const char *hooknames[]
|
||||
#endif
|
||||
};
|
||||
|
||||
#if 0
|
||||
/* Convenience structures */
|
||||
struct ipt_error_target
|
||||
{
|
||||
STRUCT_ENTRY_TARGET t;
|
||||
char error[TABLE_MAXNAMELEN];
|
||||
};
|
||||
#endif
|
||||
|
||||
struct chain_head;
|
||||
struct rule_head;
|
||||
@ -638,10 +640,10 @@ static int iptcc_compile_chain(TC_HANDLE_T h, STRUCT_REPLACE *repl, struct chain
|
||||
head = (void *)repl->entries + c->head_offset;
|
||||
head->e.target_offset = sizeof(STRUCT_ENTRY);
|
||||
head->e.next_offset = IPTCB_CHAIN_START_SIZE;
|
||||
strcpy(head->name.t.u.user.name, ERROR_TARGET);
|
||||
head->name.t.u.target_size =
|
||||
strcpy(head->name.target.u.user.name, ERROR_TARGET);
|
||||
head->name.target.u.target_size =
|
||||
ALIGN(sizeof(struct ipt_error_target));
|
||||
strcpy(head->name.error, c->name);
|
||||
strcpy(head->name.errorname, c->name);
|
||||
} else {
|
||||
repl->hook_entry[c->hooknum-1] = c->head_offset;
|
||||
repl->underflow[c->hooknum-1] = c->foot_offset;
|
||||
@ -747,10 +749,10 @@ static int iptcc_compile_table(TC_HANDLE_T h, STRUCT_REPLACE *repl)
|
||||
error = (void *)repl->entries + repl->size - IPTCB_CHAIN_ERROR_SIZE;
|
||||
error->entry.target_offset = sizeof(STRUCT_ENTRY);
|
||||
error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE;
|
||||
error->target.t.u.user.target_size =
|
||||
error->target.target.u.user.target_size =
|
||||
ALIGN(sizeof(struct ipt_error_target));
|
||||
strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET);
|
||||
strcpy((char *)&error->target.error, "ERROR");
|
||||
strcpy((char *)&error->target.target.u.user.name, ERROR_TARGET);
|
||||
strcpy((char *)&error->target.errorname, "ERROR");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -606,9 +606,9 @@ do{ \
|
||||
* should be aware of this.
|
||||
* - it follows the new order of `tmp' and appends each array element in
|
||||
* a new llist.
|
||||
* - the head of the new llist is returned.
|
||||
* - the head of the new llist is assigned to _new_head
|
||||
*/
|
||||
#define clist_qsort(_head, _counter, _cmp_func) \
|
||||
#define clist_qsort(_new_head, _head, _counter, _cmp_func) \
|
||||
({ \
|
||||
l_list *_hcq=(l_list *)(_head), *_ncq, *_hecq, *_tcq; \
|
||||
int _icq=0, _ccq; \
|
||||
@ -629,7 +629,7 @@ do{ \
|
||||
for(_icq=0; _icq<_ccq; _icq++) \
|
||||
_tcq=(l_list *)list_append(0, _tcq, _tmp_list[_icq]); \
|
||||
\
|
||||
(typeof((_head)))_hecq; \
|
||||
_new_head = (typeof((_head)))_hecq; \
|
||||
}) \
|
||||
|
||||
#endif /*LLIST_C*/
|
||||
|
@ -2,13 +2,11 @@
|
||||
#define MARK_H
|
||||
|
||||
#include "libiptc/libiptc.h"
|
||||
#include <linux/netfilter_ipv4/ip_conntrack.h>
|
||||
#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
|
||||
#include <linux/netfilter/nf_conntrack_common.h>
|
||||
#include "libiptc/ipt_conntrack.h"
|
||||
#include "libiptc/ipt_connmark.h"
|
||||
#include "libiptc/ipt_CONNMARK.h"
|
||||
|
||||
|
||||
#define MANGLE_TABLE "mangle"
|
||||
#define FILTER_TABLE "filter"
|
||||
#define NTK_MARK_CHAIN "ntk_mark_chain"
|
||||
|
@ -22,11 +22,11 @@
|
||||
#include "config.h"
|
||||
#include "igs.h"
|
||||
|
||||
#define VERSION_STR "NetsukukuD "VERSION
|
||||
#define VERSION_STR "NetsukukuD "PACKAGE_VERSION
|
||||
|
||||
#ifdef DEBUG
|
||||
#undef VERSION_STR
|
||||
#define VERSION_STR "NetsukukuD "VERSION" (debug)"
|
||||
#define VERSION_STR "NetsukukuD "PACKAGE_VERSION" (debug)"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include "ntkresolv.h"
|
||||
@ -295,7 +297,7 @@ void opts_set_question(char *arg)
|
||||
ntkresolv_safe_exit(1);
|
||||
}
|
||||
G_ALIGN(16);
|
||||
memcpy(GQT->qstdata,&i6a.in6_u,16);
|
||||
memcpy(GQT->qstdata,&i6a.__in6_u,16);
|
||||
GQT->ipv=ANDNS_IPV6;
|
||||
return;
|
||||
case QTYPE_G:
|
||||
@ -377,7 +379,7 @@ void ip_bin_to_str(void *data,char *dst)
|
||||
via=(void*)(&ia);
|
||||
break;
|
||||
case AF_INET6:
|
||||
memcpy(&(i6a.in6_u),data,16);
|
||||
memcpy(&(i6a.__in6_u),data,16);
|
||||
via=(void*)(&i6a);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user