From 512ef6a83ec13df5ce73479ed438d5d06704897a Mon Sep 17 00:00:00 2001 From: Munkyu Im Date: Thu, 9 Jul 2015 16:08:03 +0900 Subject: tap: modify configuration add other permission. modify maximum count of tap device. Change-Id: Idc28f77d2623f5a1052ef1e38cf96f8f29defada Signed-off-by: Munkyu Im --- Makefile | 2 ++ package/build.macos-64 | 1 - src/tap/tap.h | 2 +- src/tuntap.cc | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 459590d..7d05954 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,8 @@ clean: %.kext: cd src/$* && make TUNTAP_VERSION=$(TUNTAP_VERSION) -f Makefile all + + cp pkg/launchd/net.sf.tuntaposx.$*.plist $*.kext/Contents/ if test -s ".signing_identity"; then \ codesign -fv --keychain net.sf.tuntaposx.tmp -s "$$(cat .signing_identity)" \ $*.kext ; \ diff --git a/package/build.macos-64 b/package/build.macos-64 index 1b7ee81..4567f4f 100755 --- a/package/build.macos-64 +++ b/package/build.macos-64 @@ -13,7 +13,6 @@ build() { cd $SRCDIR make tap.kext - cp $SRCDIR/pkg/launchd/net.sf.tuntaposx.tap.plist $SRCDIR/tap.kext/Contents/ if [ $? -eq 0 ] then echo "build success" diff --git a/src/tap/tap.h b/src/tap/tap.h index e0a8cca..d744c57 100644 --- a/src/tap/tap.h +++ b/src/tap/tap.h @@ -37,7 +37,7 @@ extern "C" { } #define TAP_FAMILY_NAME ((char *) "tap") -#define TAP_IF_COUNT 16 /* max number of tap interfaces */ +#define TAP_IF_COUNT 10 /* max number of tap interfaces */ #define TAP_MTU 1500 #define TAP_LLADDR tap_lladdr diff --git a/src/tuntap.cc b/src/tuntap.cc index d0f8901..61abd13 100644 --- a/src/tuntap.cc +++ b/src/tuntap.cc @@ -282,7 +282,7 @@ bool tuntap_interface::register_chardev(unsigned short major) { /* register character device */ - dev_handle = devfs_make_node(makedev(major, unit), DEVFS_CHAR, 0, 0, 0660, "%s%d", + dev_handle = devfs_make_node(makedev(major, unit), DEVFS_CHAR, 0, 0, 0666, "%s%d", family_name, (int) unit); if (dev_handle == NULL) { -- cgit v1.2.3