mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-22 18:22:18 +00:00
Oh my god! I fixed the tunl0 issues by renaming it to tunl1 and creating tunl1 on my system first, Amongst other things I don't remember.
This commit is contained in:
parent
1dadd0e8b4
commit
15baa56a87
@ -603,7 +603,7 @@ int andns_gethostbyname(char *hname, inet_prefix *ip)
|
|||||||
error(err_str);
|
error(err_str);
|
||||||
err_ret(ERR_RSLRSL,-1);
|
err_ret(ERR_RSLRSL,-1);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "Addr is %p, rdata is %p\n", (void*)addr, (void*) dp->pkt_answ->rdata);
|
fprintf(stderr, "Addr is %p, rdata is %p rawr %p hai %p\n", (void*)&addr, (void*) dp->pkt_answ->rdata, (void*) dp->pkt_answ, (void*) dp);
|
||||||
if ((dp == NULL) || (dp->pkt_answ == NULL) || (dp->pkt_answ->rdata == NULL)) return -1;
|
if ((dp == NULL) || (dp->pkt_answ == NULL) || (dp->pkt_answ->rdata == NULL)) return -1;
|
||||||
memcpy(&addr, dp->pkt_answ->rdata, sizeof(uint32_t));
|
memcpy(&addr, dp->pkt_answ->rdata, sizeof(uint32_t));
|
||||||
addr=ntohl(addr);
|
addr=ntohl(addr);
|
||||||
|
@ -56,6 +56,7 @@ int tunnel_add(inet_prefix *remote, inet_prefix *local, char *dev,
|
|||||||
int tunnel_change(inet_prefix *remote, inet_prefix *local, char *dev,
|
int tunnel_change(inet_prefix *remote, inet_prefix *local, char *dev,
|
||||||
char *tunl_prefix, int tunl_number)
|
char *tunl_prefix, int tunl_number)
|
||||||
{
|
{
|
||||||
|
error("The value of siocchgtunnel is: %d", SIOCCHGTUNNEL);
|
||||||
return do_add(SIOCCHGTUNNEL, remote, local, dev, tunl_prefix,
|
return do_add(SIOCCHGTUNNEL, remote, local, dev, tunl_prefix,
|
||||||
tunl_number);
|
tunl_number);
|
||||||
}
|
}
|
||||||
@ -150,6 +151,7 @@ static int do_add_ioctl(int cmd, const char *basedev, struct ip_tunnel_parm *p)
|
|||||||
ifr.ifr_ifru.ifru_data = (void*)p;
|
ifr.ifr_ifru.ifru_data = (void*)p;
|
||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
err = ioctl(fd, cmd, &ifr);
|
err = ioctl(fd, cmd, &ifr);
|
||||||
|
error("Socket File Descriptor Is: %i cmd is: %i err is: %i ifr is: %s Errno is: %d", fd, cmd, err, &ifr, errno);
|
||||||
if (err)
|
if (err)
|
||||||
error(ERROR_MSG "ioctl: %s",ERROR_POS, strerror(errno));
|
error(ERROR_MSG "ioctl: %s",ERROR_POS, strerror(errno));
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -246,6 +248,7 @@ int do_get(char *dev)
|
|||||||
static int do_add(int cmd, inet_prefix *remote, inet_prefix *local, char *dev,
|
static int do_add(int cmd, inet_prefix *remote, inet_prefix *local, char *dev,
|
||||||
char *tunl_prefix, int tunl_number)
|
char *tunl_prefix, int tunl_number)
|
||||||
{
|
{
|
||||||
|
error("This is the do_add function.");
|
||||||
struct ip_tunnel_parm p;
|
struct ip_tunnel_parm p;
|
||||||
|
|
||||||
if (fill_tunnel_parm(cmd, remote, local, dev, tunl_prefix,
|
if (fill_tunnel_parm(cmd, remote, local, dev, tunl_prefix,
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#include "if.h"
|
#include "if.h"
|
||||||
|
|
||||||
#define DEFAULT_TUNL_PREFIX "tunl"
|
#define DEFAULT_TUNL_PREFIX "tunl"
|
||||||
#define DEFAULT_TUNL_NUMBER 0 /* The permanent tunl0 device */
|
#define DEFAULT_TUNL_NUMBER 1 /* The permanent tunl0 device */
|
||||||
#define DEFAULT_TUNL_IF "tunl0"
|
#define DEFAULT_TUNL_IF "tunl1"
|
||||||
#define NTK_TUNL_PREFIX "ntk_tunl"
|
#define NTK_TUNL_PREFIX "ntk_tunl"
|
||||||
|
|
||||||
/* Usage: printf(TUNL_STRING, TUNL_NUMBER("tunl", x)); */
|
/* Usage: printf(TUNL_STRING, TUNL_NUMBER("tunl", x)); */
|
||||||
|
@ -105,6 +105,7 @@ int commit_rules(iptc_handle_t *t)
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
res=iptc_commit(t);
|
res=iptc_commit(t);
|
||||||
|
error("This is the value of res: %i This is the value of t is: %s", res, t);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
error("In commit_rules: %s.",iptc_strerror(errno));
|
error("In commit_rules: %s.",iptc_strerror(errno));
|
||||||
err_ret(ERR_NETCOM,-1);
|
err_ret(ERR_NETCOM,-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user