Compare commits
9 Commits
v0.0.82-mu
...
v0.0.86-mu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0664fc3b21 | ||
|
|
2cb24c0523 | ||
|
|
65be22202c | ||
|
|
6cc32bafd9 | ||
|
|
6c268e658f | ||
|
|
33e24632d0 | ||
|
|
e1b4c6aafc | ||
|
|
09d1932588 | ||
|
|
4988479df4 |
@@ -11,5 +11,8 @@ cd ..
|
|||||||
[ -x glorytun ] || exit 1
|
[ -x glorytun ] || exit 1
|
||||||
|
|
||||||
mkdir -p deploy
|
mkdir -p deploy
|
||||||
|
|
||||||
|
cp glorytun deploy/glorytun-$(cat VERSION)-$(uname -m).debug.bin
|
||||||
|
|
||||||
strip -s glorytun
|
strip -s glorytun
|
||||||
mv glorytun deploy/glorytun-$(cat VERSION)-$(uname -m).bin
|
cp glorytun deploy/glorytun-$(cat VERSION)-$(uname -m).bin
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ glorytun_SOURCES = \
|
|||||||
src/db.c \
|
src/db.c \
|
||||||
src/db.h
|
src/db.h
|
||||||
|
|
||||||
glorytun_CFLAGS += -I$(srcdir)/mud
|
|
||||||
glorytun_SOURCES += \
|
glorytun_SOURCES += \
|
||||||
mud/mud.h \
|
mud/mud.h \
|
||||||
mud/mud.c
|
mud/mud.c
|
||||||
|
|||||||
2
mud
2
mud
Submodule mud updated: 7cc6e7ad72...f6b6610980
2
src/ip.h
2
src/ip.h
@@ -30,7 +30,9 @@ ip_get_common(struct ip_common *ic, const uint8_t *data, size_t size)
|
|||||||
ic->proto = data[9];
|
ic->proto = data[9];
|
||||||
ic->hdr_size = (data[0] & 0xF) << 2;
|
ic->hdr_size = (data[0] & 0xF) << 2;
|
||||||
ic->size = ((data[2] << 8) | data[3]);
|
ic->size = ((data[2] << 8) | data[3]);
|
||||||
|
if (ic->size >= 20)
|
||||||
return 0;
|
return 0;
|
||||||
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
ic->tc = ((data[0] & 0xF) << 4) | (data[1] >> 4);
|
ic->tc = ((data[0] & 0xF) << 4) | (data[1] >> 4);
|
||||||
ic->proto = data[6];
|
ic->proto = data[6];
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
#include "mud.h"
|
#include "../mud/mud.h"
|
||||||
|
|
||||||
#ifndef O_CLOEXEC
|
#ifndef O_CLOEXEC
|
||||||
#define O_CLOEXEC 0
|
#define O_CLOEXEC 0
|
||||||
@@ -50,6 +50,7 @@ static struct {
|
|||||||
.bind = {
|
.bind = {
|
||||||
.port = 5000,
|
.port = 5000,
|
||||||
},
|
},
|
||||||
|
.mtu = 1500,
|
||||||
.timeout = 5000,
|
.timeout = 5000,
|
||||||
.ipv4 = 1,
|
.ipv4 = 1,
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
@@ -386,8 +387,7 @@ main(int argc, char **argv)
|
|||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
|
|
||||||
while (sizeof(buf) - size >= gt.mtu) {
|
while (sizeof(buf) - size >= gt.mtu) {
|
||||||
const int r = tun_read(tun_fd, &buf[size],
|
const int r = tun_read(tun_fd, &buf[size], sizeof(buf) - size);
|
||||||
sizeof(buf) - size);
|
|
||||||
|
|
||||||
if (r <= 0 || r > gt.mtu)
|
if (r <= 0 || r > gt.mtu)
|
||||||
break;
|
break;
|
||||||
@@ -422,7 +422,7 @@ main(int argc, char **argv)
|
|||||||
tc = ic.tc & 0xFC;
|
tc = ic.tc & 0xFC;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p == q)
|
if (p >= q)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
int r = mud_send(mud, &buf[p], q - p, tc);
|
int r = mud_send(mud, &buf[p], q - p, tc);
|
||||||
|
|||||||
Reference in New Issue
Block a user