Import Upstream version 1.0.35
This commit is contained in:
parent
b28bb7b29b
commit
a04a7bcd67
44 changed files with 4173 additions and 2323 deletions
247
src/Makefile.in
247
src/Makefile.in
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -178,7 +178,29 @@ am__v_at_0 = @
|
|||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/avl_tree.Po ./$(DEPDIR)/conf.Po \
|
||||
./$(DEPDIR)/connection.Po ./$(DEPDIR)/dropin.Po \
|
||||
./$(DEPDIR)/dummy_device.Po ./$(DEPDIR)/edge.Po \
|
||||
./$(DEPDIR)/event.Po ./$(DEPDIR)/fake-getaddrinfo.Po \
|
||||
./$(DEPDIR)/fake-getnameinfo.Po ./$(DEPDIR)/getopt.Po \
|
||||
./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/graph.Po \
|
||||
./$(DEPDIR)/list.Po ./$(DEPDIR)/logger.Po ./$(DEPDIR)/meta.Po \
|
||||
./$(DEPDIR)/multicast_device.Po ./$(DEPDIR)/net.Po \
|
||||
./$(DEPDIR)/net_packet.Po ./$(DEPDIR)/net_setup.Po \
|
||||
./$(DEPDIR)/net_socket.Po ./$(DEPDIR)/netutl.Po \
|
||||
./$(DEPDIR)/node.Po ./$(DEPDIR)/pidfile.Po \
|
||||
./$(DEPDIR)/process.Po ./$(DEPDIR)/protocol.Po \
|
||||
./$(DEPDIR)/protocol_auth.Po ./$(DEPDIR)/protocol_edge.Po \
|
||||
./$(DEPDIR)/protocol_key.Po ./$(DEPDIR)/protocol_misc.Po \
|
||||
./$(DEPDIR)/protocol_subnet.Po ./$(DEPDIR)/proxy.Po \
|
||||
./$(DEPDIR)/raw_socket_device.Po ./$(DEPDIR)/route.Po \
|
||||
./$(DEPDIR)/subnet.Po ./$(DEPDIR)/tincd.Po \
|
||||
./$(DEPDIR)/uml_device.Po ./$(DEPDIR)/utils.Po \
|
||||
./$(DEPDIR)/vde_device.Po bsd/$(DEPDIR)/device.Po \
|
||||
bsd/$(DEPDIR)/tunemu.Po cygwin/$(DEPDIR)/device.Po \
|
||||
linux/$(DEPDIR)/device.Po mingw/$(DEPDIR)/device.Po \
|
||||
solaris/$(DEPDIR)/device.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
|
@ -354,8 +376,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -482,50 +504,56 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_tree.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dropin.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edge.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getaddrinfo.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getnameinfo.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multicast_device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_packet.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_setup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_socket.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netutl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pidfile.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_auth.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_edge.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_key.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_misc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_subnet.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxy.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_socket_device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/route.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnet.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uml_device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vde_device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/tunemu.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@cygwin/$(DEPDIR)/device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@linux/$(DEPDIR)/device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@mingw/$(DEPDIR)/device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@solaris/$(DEPDIR)/device.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_tree.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dropin.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edge.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getaddrinfo.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getnameinfo.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multicast_device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_packet.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_setup.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_socket.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netutl.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pidfile.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_auth.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_edge.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_key.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_misc.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol_subnet.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxy.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_socket_device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/route.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnet.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tincd.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uml_device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vde_device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@bsd/$(DEPDIR)/tunemu.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@cygwin/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@linux/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@mingw/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@solaris/$(DEPDIR)/device.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
|
|
@ -595,7 +623,10 @@ cscopelist-am: $(am__tagged_files)
|
|||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -677,7 +708,50 @@ clean: clean-am
|
|||
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR) bsd/$(DEPDIR) cygwin/$(DEPDIR) linux/$(DEPDIR) mingw/$(DEPDIR) solaris/$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/avl_tree.Po
|
||||
-rm -f ./$(DEPDIR)/conf.Po
|
||||
-rm -f ./$(DEPDIR)/connection.Po
|
||||
-rm -f ./$(DEPDIR)/dropin.Po
|
||||
-rm -f ./$(DEPDIR)/dummy_device.Po
|
||||
-rm -f ./$(DEPDIR)/edge.Po
|
||||
-rm -f ./$(DEPDIR)/event.Po
|
||||
-rm -f ./$(DEPDIR)/fake-getaddrinfo.Po
|
||||
-rm -f ./$(DEPDIR)/fake-getnameinfo.Po
|
||||
-rm -f ./$(DEPDIR)/getopt.Po
|
||||
-rm -f ./$(DEPDIR)/getopt1.Po
|
||||
-rm -f ./$(DEPDIR)/graph.Po
|
||||
-rm -f ./$(DEPDIR)/list.Po
|
||||
-rm -f ./$(DEPDIR)/logger.Po
|
||||
-rm -f ./$(DEPDIR)/meta.Po
|
||||
-rm -f ./$(DEPDIR)/multicast_device.Po
|
||||
-rm -f ./$(DEPDIR)/net.Po
|
||||
-rm -f ./$(DEPDIR)/net_packet.Po
|
||||
-rm -f ./$(DEPDIR)/net_setup.Po
|
||||
-rm -f ./$(DEPDIR)/net_socket.Po
|
||||
-rm -f ./$(DEPDIR)/netutl.Po
|
||||
-rm -f ./$(DEPDIR)/node.Po
|
||||
-rm -f ./$(DEPDIR)/pidfile.Po
|
||||
-rm -f ./$(DEPDIR)/process.Po
|
||||
-rm -f ./$(DEPDIR)/protocol.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_auth.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_edge.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_key.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_misc.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_subnet.Po
|
||||
-rm -f ./$(DEPDIR)/proxy.Po
|
||||
-rm -f ./$(DEPDIR)/raw_socket_device.Po
|
||||
-rm -f ./$(DEPDIR)/route.Po
|
||||
-rm -f ./$(DEPDIR)/subnet.Po
|
||||
-rm -f ./$(DEPDIR)/tincd.Po
|
||||
-rm -f ./$(DEPDIR)/uml_device.Po
|
||||
-rm -f ./$(DEPDIR)/utils.Po
|
||||
-rm -f ./$(DEPDIR)/vde_device.Po
|
||||
-rm -f bsd/$(DEPDIR)/device.Po
|
||||
-rm -f bsd/$(DEPDIR)/tunemu.Po
|
||||
-rm -f cygwin/$(DEPDIR)/device.Po
|
||||
-rm -f linux/$(DEPDIR)/device.Po
|
||||
-rm -f mingw/$(DEPDIR)/device.Po
|
||||
-rm -f solaris/$(DEPDIR)/device.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
|
@ -723,7 +797,50 @@ install-ps-am:
|
|||
installcheck-am: installcheck-sbinPROGRAMS
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR) bsd/$(DEPDIR) cygwin/$(DEPDIR) linux/$(DEPDIR) mingw/$(DEPDIR) solaris/$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/avl_tree.Po
|
||||
-rm -f ./$(DEPDIR)/conf.Po
|
||||
-rm -f ./$(DEPDIR)/connection.Po
|
||||
-rm -f ./$(DEPDIR)/dropin.Po
|
||||
-rm -f ./$(DEPDIR)/dummy_device.Po
|
||||
-rm -f ./$(DEPDIR)/edge.Po
|
||||
-rm -f ./$(DEPDIR)/event.Po
|
||||
-rm -f ./$(DEPDIR)/fake-getaddrinfo.Po
|
||||
-rm -f ./$(DEPDIR)/fake-getnameinfo.Po
|
||||
-rm -f ./$(DEPDIR)/getopt.Po
|
||||
-rm -f ./$(DEPDIR)/getopt1.Po
|
||||
-rm -f ./$(DEPDIR)/graph.Po
|
||||
-rm -f ./$(DEPDIR)/list.Po
|
||||
-rm -f ./$(DEPDIR)/logger.Po
|
||||
-rm -f ./$(DEPDIR)/meta.Po
|
||||
-rm -f ./$(DEPDIR)/multicast_device.Po
|
||||
-rm -f ./$(DEPDIR)/net.Po
|
||||
-rm -f ./$(DEPDIR)/net_packet.Po
|
||||
-rm -f ./$(DEPDIR)/net_setup.Po
|
||||
-rm -f ./$(DEPDIR)/net_socket.Po
|
||||
-rm -f ./$(DEPDIR)/netutl.Po
|
||||
-rm -f ./$(DEPDIR)/node.Po
|
||||
-rm -f ./$(DEPDIR)/pidfile.Po
|
||||
-rm -f ./$(DEPDIR)/process.Po
|
||||
-rm -f ./$(DEPDIR)/protocol.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_auth.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_edge.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_key.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_misc.Po
|
||||
-rm -f ./$(DEPDIR)/protocol_subnet.Po
|
||||
-rm -f ./$(DEPDIR)/proxy.Po
|
||||
-rm -f ./$(DEPDIR)/raw_socket_device.Po
|
||||
-rm -f ./$(DEPDIR)/route.Po
|
||||
-rm -f ./$(DEPDIR)/subnet.Po
|
||||
-rm -f ./$(DEPDIR)/tincd.Po
|
||||
-rm -f ./$(DEPDIR)/uml_device.Po
|
||||
-rm -f ./$(DEPDIR)/utils.Po
|
||||
-rm -f ./$(DEPDIR)/vde_device.Po
|
||||
-rm -f bsd/$(DEPDIR)/device.Po
|
||||
-rm -f bsd/$(DEPDIR)/tunemu.Po
|
||||
-rm -f cygwin/$(DEPDIR)/device.Po
|
||||
-rm -f linux/$(DEPDIR)/device.Po
|
||||
-rm -f mingw/$(DEPDIR)/device.Po
|
||||
-rm -f solaris/$(DEPDIR)/device.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
@ -743,19 +860,19 @@ uninstall-am: uninstall-sbinPROGRAMS
|
|||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
|
||||
install-strip installcheck installcheck-am \
|
||||
installcheck-sbinPROGRAMS installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-sbinPROGRAMS
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
||||
clean-generic clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
|
||||
distclean distclean-compile distclean-generic distclean-tags \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-sbinPROGRAMS install-strip installcheck \
|
||||
installcheck-am installcheck-sbinPROGRAMS installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
|
|
|||
30
src/conf.c
30
src/conf.c
|
|
@ -81,18 +81,9 @@ config_t *new_config(void) {
|
|||
}
|
||||
|
||||
void free_config(config_t *cfg) {
|
||||
if(cfg->variable) {
|
||||
free(cfg->variable);
|
||||
}
|
||||
|
||||
if(cfg->value) {
|
||||
free(cfg->value);
|
||||
}
|
||||
|
||||
if(cfg->file) {
|
||||
free(cfg->file);
|
||||
}
|
||||
|
||||
free(cfg->variable);
|
||||
free(cfg->value);
|
||||
free(cfg->file);
|
||||
free(cfg);
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +195,7 @@ bool get_config_address(const config_t *cfg, struct addrinfo **result) {
|
|||
}
|
||||
|
||||
bool get_config_subnet(const config_t *cfg, subnet_t **result) {
|
||||
subnet_t subnet = {};
|
||||
subnet_t subnet = {0};
|
||||
|
||||
if(!cfg) {
|
||||
return false;
|
||||
|
|
@ -432,7 +423,11 @@ bool read_server_config(void) {
|
|||
|
||||
// And we try to read the ones that end with ".conf"
|
||||
if(l > 5 && !strcmp(".conf", & ep->d_name[ l - 5 ])) {
|
||||
snprintf(fname, sizeof(fname), "%s/%s", dname, ep->d_name);
|
||||
if((size_t)snprintf(fname, sizeof(fname), "%s/%s", dname, ep->d_name) >= sizeof(fname)) {
|
||||
logger(LOG_ERR, "Pathname too long: %s/%s", dname, ep->d_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
x = read_config_file(config_tree, fname);
|
||||
}
|
||||
}
|
||||
|
|
@ -573,7 +568,12 @@ FILE *ask_and_open(const char *filename, const char *what) {
|
|||
#endif
|
||||
/* The directory is a relative path or a filename. */
|
||||
getcwd(directory, sizeof(directory));
|
||||
snprintf(abspath, sizeof(abspath), "%s/%s", directory, fn);
|
||||
|
||||
if((size_t)snprintf(abspath, sizeof(abspath), "%s/%s", directory, fn) >= sizeof(abspath)) {
|
||||
fprintf(stderr, "Pathname too long: %s/%s\n", directory, fn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fn = abspath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ typedef struct connection_status_t {
|
|||
unsigned int decryptin: 1; /* 1 if we have to decrypt incoming traffic */
|
||||
unsigned int mst: 1; /* 1 if this connection is part of a minimum spanning tree */
|
||||
unsigned int proxy_passed: 1; /* 1 if we are connecting via a proxy and we have finished talking with it */
|
||||
unsigned int unused: 22;
|
||||
unsigned int tarpit: 1; /* 1 if the connection should be added to the tarpit */
|
||||
unsigned int unused: 21;
|
||||
} connection_status_t;
|
||||
|
||||
#include "edge.h"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ static bool setup_device(void) {
|
|||
}
|
||||
|
||||
static void close_device(void) {
|
||||
free(device);
|
||||
free(iface);
|
||||
}
|
||||
|
||||
static bool read_packet(vpn_packet_t *packet) {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
* fake library for ssh
|
||||
*
|
||||
* This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
|
||||
* These funtions are defined in rfc2133.
|
||||
* These functions are defined in rfc2133.
|
||||
*
|
||||
* But these functions are not implemented correctly. The minimum subset
|
||||
* is implemented for ssh use only. For exapmle, this routine assumes
|
||||
* is implemented for ssh use only. For example, this routine assumes
|
||||
* that ai_family is AF_INET. Don't use it for another purpose.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
* fake library for ssh
|
||||
*
|
||||
* This file includes getnameinfo().
|
||||
* These funtions are defined in rfc2133.
|
||||
* These functions are defined in rfc2133.
|
||||
*
|
||||
* But these functions are not implemented correctly. The minimum subset
|
||||
* is implemented for ssh use only. For exapmle, this routine assumes
|
||||
* is implemented for ssh use only. For example, this routine assumes
|
||||
* that ai_family is AF_INET. Don't use it for another purpose.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (WIN32) && !defined (__CYGWIN32__32)
|
||||
#if defined (WIN32) && !defined (__CYGWIN32__)
|
||||
/* It's not Unix, really. See? Capital letters. */
|
||||
#include <windows.h>
|
||||
#define getpid() GetCurrentProcessId()
|
||||
|
|
|
|||
|
|
@ -274,9 +274,9 @@ static void sssp_bfs(void) {
|
|||
n->mtuevent = NULL;
|
||||
}
|
||||
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
|
||||
xasprintf(&envp[3], "NODE=%s", n->name);
|
||||
sockaddr2str(&n->address, &address, &port);
|
||||
xasprintf(&envp[4], "REMOTEADDRESS=%s", address);
|
||||
|
|
|
|||
24
src/net.c
24
src/net.c
|
|
@ -180,6 +180,22 @@ static int build_fdset(fd_set *readset, fd_set *writeset) {
|
|||
return max;
|
||||
}
|
||||
|
||||
/* Put a misbehaving connection in the tarpit */
|
||||
void tarpit(int fd) {
|
||||
static int pits[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
|
||||
static int next_pit = 0;
|
||||
|
||||
if(pits[next_pit] != -1) {
|
||||
closesocket(pits[next_pit]);
|
||||
}
|
||||
|
||||
pits[next_pit++] = fd;
|
||||
|
||||
if(next_pit >= (int)(sizeof pits / sizeof pits[0])) {
|
||||
next_pit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Terminate a connection:
|
||||
- Close the socket
|
||||
|
|
@ -203,7 +219,11 @@ void terminate_connection(connection_t *c, bool report) {
|
|||
}
|
||||
|
||||
if(c->socket) {
|
||||
closesocket(c->socket);
|
||||
if(c->status.tarpit) {
|
||||
tarpit(c->socket);
|
||||
} else {
|
||||
closesocket(c->socket);
|
||||
}
|
||||
}
|
||||
|
||||
if(c->edge) {
|
||||
|
|
@ -299,6 +319,7 @@ static void check_dead_connections(void) {
|
|||
closesocket(c->socket);
|
||||
do_outgoing_connection(c);
|
||||
} else {
|
||||
c->status.tarpit = true;
|
||||
terminate_connection(c, false);
|
||||
}
|
||||
}
|
||||
|
|
@ -380,6 +401,7 @@ static void check_network_activity(fd_set *readset, fd_set *writeset) {
|
|||
|
||||
if(FD_ISSET(c->socket, readset)) {
|
||||
if(!receive_meta(c)) {
|
||||
c->status.tarpit = true;
|
||||
terminate_connection(c, c->status.active);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ extern void flush_queue(struct node_t *n);
|
|||
extern bool read_rsa_public_key(struct connection_t *c);
|
||||
extern void send_mtu_probe(struct node_t *n);
|
||||
extern void load_all_subnets(void);
|
||||
extern void tarpit(int fd);
|
||||
|
||||
#ifndef HAVE_MINGW
|
||||
#define closesocket(s) close(s)
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ static bool read_rsa_private_key(void) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#if !defined(HAVE_MINGW) && !defined(HAVE___CYGWIN32__)
|
||||
#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
|
||||
struct stat s;
|
||||
|
||||
if(!fstat(fileno(fp), &s)) {
|
||||
|
|
@ -388,8 +388,8 @@ static bool setup_myself(void) {
|
|||
char *address = NULL;
|
||||
char *proxy = NULL;
|
||||
char *space;
|
||||
char *envp[5] = {};
|
||||
struct addrinfo *ai, *aip, hint = {};
|
||||
char *envp[5] = {0};
|
||||
struct addrinfo *ai, *aip, hint = {0};
|
||||
bool choice;
|
||||
int i, err;
|
||||
int replaywin_int;
|
||||
|
|
@ -852,15 +852,15 @@ static bool setup_myself(void) {
|
|||
}
|
||||
|
||||
/* Run tinc-up script to further initialize the tap interface */
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
|
||||
xasprintf(&envp[3], "NAME=%s", myself->name);
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
Sleep(1000);
|
||||
#endif
|
||||
#ifdef HAVE___CYGWIN32__
|
||||
#ifdef HAVE_CYGWIN
|
||||
sleep(1);
|
||||
#endif
|
||||
execute_script("tinc-up", envp);
|
||||
|
|
@ -1068,7 +1068,7 @@ bool setup_network(void) {
|
|||
void close_network_connections(void) {
|
||||
avl_node_t *node, *next;
|
||||
connection_t *c;
|
||||
char *envp[5] = {};
|
||||
char *envp[5] = {0};
|
||||
int i;
|
||||
|
||||
for(node = connection_tree->head; node; node = next) {
|
||||
|
|
@ -1099,9 +1099,9 @@ void close_network_connections(void) {
|
|||
close(listen_socket[i].udp);
|
||||
}
|
||||
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
|
||||
xasprintf(&envp[3], "NAME=%s", myself->name);
|
||||
|
||||
exit_requests();
|
||||
|
|
|
|||
|
|
@ -639,6 +639,9 @@ void setup_outgoing_connection(outgoing_t *outgoing) {
|
|||
new connection
|
||||
*/
|
||||
bool handle_new_meta_connection(int sock) {
|
||||
static const int max_accept_burst = 10;
|
||||
static int last_accept_burst;
|
||||
static int last_accept_time;
|
||||
connection_t *c;
|
||||
sockaddr_t sa;
|
||||
int fd;
|
||||
|
|
@ -651,6 +654,22 @@ bool handle_new_meta_connection(int sock) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(last_accept_time == now) {
|
||||
last_accept_burst++;
|
||||
|
||||
if(last_accept_burst >= max_accept_burst) {
|
||||
if(last_accept_burst == max_accept_burst) {
|
||||
ifdebug(CONNECTIONS) logger(LOG_WARNING, "Throttling incoming connections");
|
||||
}
|
||||
|
||||
tarpit(fd);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
last_accept_burst = 0;
|
||||
last_accept_time = now;
|
||||
}
|
||||
|
||||
sockaddrunmap(&sa);
|
||||
|
||||
c = new_connection();
|
||||
|
|
@ -672,7 +691,6 @@ bool handle_new_meta_connection(int sock) {
|
|||
connection_add(c);
|
||||
|
||||
c->allow_request = ID;
|
||||
send_id(c);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ bool hostnames = false;
|
|||
Return NULL on failure.
|
||||
*/
|
||||
struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype) {
|
||||
struct addrinfo *ai = NULL, hint = {};
|
||||
struct addrinfo *ai = NULL, hint = {0};
|
||||
int err;
|
||||
|
||||
hint.ai_family = addressfamily;
|
||||
|
|
@ -55,7 +55,7 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock
|
|||
}
|
||||
|
||||
sockaddr_t str2sockaddr(const char *address, const char *port) {
|
||||
struct addrinfo *ai = NULL, hint = {};
|
||||
struct addrinfo *ai = NULL, hint = {0};
|
||||
sockaddr_t result;
|
||||
int err;
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ void node_del(node_t *n) {
|
|||
}
|
||||
|
||||
node_t *lookup_node(char *name) {
|
||||
node_t n = {};
|
||||
node_t n = {0};
|
||||
|
||||
n.name = name;
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ node_t *lookup_node(char *name) {
|
|||
}
|
||||
|
||||
node_t *lookup_node_udp(const sockaddr_t *sa) {
|
||||
node_t n = {};
|
||||
node_t n = {0};
|
||||
|
||||
n.address = *sa;
|
||||
n.name = NULL;
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ void exit_requests(void) {
|
|||
}
|
||||
|
||||
bool seen_request(char *request) {
|
||||
past_request_t *new, p = {};
|
||||
past_request_t *new, p = {0};
|
||||
|
||||
p.request = request;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ bool id_h(connection_t *c) {
|
|||
|
||||
/* Check if identity is a valid name */
|
||||
|
||||
if(!check_id(name)) {
|
||||
if(!check_id(name) || !strcmp(name, myself->name)) {
|
||||
logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ID", c->name,
|
||||
c->hostname, "invalid name");
|
||||
return false;
|
||||
|
|
@ -96,6 +96,11 @@ bool id_h(connection_t *c) {
|
|||
}
|
||||
|
||||
c->allow_request = ACK;
|
||||
|
||||
if(!c->outgoing) {
|
||||
send_id(c);
|
||||
}
|
||||
|
||||
return send_ack(c);
|
||||
}
|
||||
|
||||
|
|
@ -115,6 +120,10 @@ bool id_h(connection_t *c) {
|
|||
|
||||
c->allow_request = METAKEY;
|
||||
|
||||
if(!c->outgoing) {
|
||||
send_id(c);
|
||||
}
|
||||
|
||||
return send_metakey(c);
|
||||
}
|
||||
|
||||
|
|
@ -301,7 +310,8 @@ bool metakey_h(connection_t *c) {
|
|||
c->inbudget = byte_budget(c->incipher);
|
||||
c->status.decryptin = true;
|
||||
} else {
|
||||
c->incipher = NULL;
|
||||
logger(LOG_ERR, "%s (%s) uses null cipher!", c->name, c->hostname);
|
||||
return false;
|
||||
}
|
||||
|
||||
c->inmaclength = maclength;
|
||||
|
|
@ -319,7 +329,8 @@ bool metakey_h(connection_t *c) {
|
|||
return false;
|
||||
}
|
||||
} else {
|
||||
c->indigest = NULL;
|
||||
logger(LOG_ERR, "%s (%s) uses null digest!", c->name, c->hostname);
|
||||
return false;
|
||||
}
|
||||
|
||||
c->incompression = compression;
|
||||
|
|
@ -393,7 +404,11 @@ bool challenge_h(connection_t *c) {
|
|||
|
||||
/* Rest is done by send_chal_reply() */
|
||||
|
||||
return send_chal_reply(c);
|
||||
if(c->outgoing) {
|
||||
return send_chal_reply(c);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool send_chal_reply(connection_t *c) {
|
||||
|
|
@ -495,6 +510,10 @@ bool chal_reply_h(connection_t *c) {
|
|||
|
||||
c->allow_request = ACK;
|
||||
|
||||
if(!c->outgoing) {
|
||||
send_chal_reply(c);
|
||||
}
|
||||
|
||||
return send_ack(c);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ bool add_edge_h(connection_t *c) {
|
|||
|
||||
/* Check if names are valid */
|
||||
|
||||
if(!check_id(from_name) || !check_id(to_name)) {
|
||||
if(!check_id(from_name) || !check_id(to_name) || !strcmp(from_name, to_name)) {
|
||||
logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ADD_EDGE", c->name,
|
||||
c->hostname, "invalid name");
|
||||
return false;
|
||||
|
|
@ -197,7 +197,7 @@ bool del_edge_h(connection_t *c) {
|
|||
|
||||
/* Check if names are valid */
|
||||
|
||||
if(!check_id(from_name) || !check_id(to_name)) {
|
||||
if(!check_id(from_name) || !check_id(to_name) || !strcmp(from_name, to_name)) {
|
||||
logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_EDGE", c->name,
|
||||
c->hostname, "invalid name");
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -286,6 +286,11 @@ bool ans_key_h(connection_t *c) {
|
|||
return true;
|
||||
}
|
||||
} else {
|
||||
if(from->outkeylength != 1) {
|
||||
logger(LOG_ERR, "Node %s (%s) uses wrong keylength!", from->name, from->hostname);
|
||||
return true;
|
||||
}
|
||||
|
||||
from->outcipher = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ bool add_subnet_h(connection_t *c) {
|
|||
char subnetstr[MAX_STRING_SIZE];
|
||||
char name[MAX_STRING_SIZE];
|
||||
node_t *owner;
|
||||
subnet_t s = {}, *new, *old;
|
||||
subnet_t s = {0}, *new, *old;
|
||||
|
||||
if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
||||
logger(LOG_ERR, "Got bad %s from %s (%s)", "ADD_SUBNET", c->name,
|
||||
|
|
@ -160,7 +160,7 @@ bool del_subnet_h(connection_t *c) {
|
|||
char subnetstr[MAX_STRING_SIZE];
|
||||
char name[MAX_STRING_SIZE];
|
||||
node_t *owner;
|
||||
subnet_t s = {}, *find;
|
||||
subnet_t s = {0}, *find;
|
||||
|
||||
if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
||||
logger(LOG_ERR, "Got bad %s from %s (%s)", "DEL_SUBNET", c->name,
|
||||
|
|
|
|||
29
src/route.c
29
src/route.c
|
|
@ -116,8 +116,8 @@ static void swap_mac_addresses(vpn_packet_t *packet) {
|
|||
/* RFC 792 */
|
||||
|
||||
static void route_ipv4_unreachable(node_t *source, vpn_packet_t *packet, length_t ether_size, uint8_t type, uint8_t code) {
|
||||
struct ip ip = {};
|
||||
struct icmp icmp = {};
|
||||
struct ip ip = {0};
|
||||
struct icmp icmp = {0};
|
||||
|
||||
struct in_addr ip_src;
|
||||
struct in_addr ip_dst;
|
||||
|
|
@ -218,7 +218,7 @@ static void route_ipv4_unreachable(node_t *source, vpn_packet_t *packet, length_
|
|||
|
||||
static void route_ipv6_unreachable(node_t *source, vpn_packet_t *packet, length_t ether_size, uint8_t type, uint8_t code) {
|
||||
struct ip6_hdr ip6;
|
||||
struct icmp6_hdr icmp6 = {};
|
||||
struct icmp6_hdr icmp6 = {0};
|
||||
uint16_t checksum;
|
||||
|
||||
struct {
|
||||
|
|
@ -632,11 +632,13 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) {
|
|||
}
|
||||
|
||||
if(!subnet->owner->status.reachable) {
|
||||
return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
|
||||
route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
|
||||
return;
|
||||
}
|
||||
|
||||
if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
|
||||
return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
|
||||
route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
|
||||
return;
|
||||
}
|
||||
|
||||
if(decrement_ttl && source != myself && subnet->owner != myself)
|
||||
|
|
@ -656,7 +658,8 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) {
|
|||
}
|
||||
|
||||
if(directonly && subnet->owner != via) {
|
||||
return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
|
||||
route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
|
||||
return;
|
||||
}
|
||||
|
||||
if(via && packet->len > MAX(via->mtu, 590) && via != myself) {
|
||||
|
|
@ -723,17 +726,20 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) {
|
|||
}
|
||||
|
||||
if(!subnet->owner->status.reachable) {
|
||||
return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
|
||||
route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
|
||||
return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
|
||||
route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
|
||||
return;
|
||||
}
|
||||
|
||||
if(decrement_ttl && source != myself && subnet->owner != myself)
|
||||
if(decrement_ttl && source != myself && subnet->owner != myself) {
|
||||
if(!do_decrement_ttl(source, packet)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(priorityinheritance) {
|
||||
packet->priority = ((packet->data[14] & 0x0f) << 4) | (packet->data[15] >> 4);
|
||||
|
|
@ -747,7 +753,8 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) {
|
|||
}
|
||||
|
||||
if(directonly && subnet->owner != via) {
|
||||
return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
|
||||
route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
|
||||
return;
|
||||
}
|
||||
|
||||
if(via && packet->len > MAX(via->mtu, 1294) && via != myself) {
|
||||
|
|
@ -875,7 +882,7 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) {
|
|||
memcpy(packet->data, packet->data + ETH_ALEN, ETH_ALEN); /* copy destination address */
|
||||
packet->data[ETH_ALEN * 2 - 1] ^= 0xFF; /* mangle source address so it looks like it's not from us */
|
||||
|
||||
ip6.ip6_dst = ip6.ip6_src; /* swap destination and source protocoll address */
|
||||
ip6.ip6_dst = ip6.ip6_src; /* swap destination and source protocol address */
|
||||
ip6.ip6_src = ns.nd_ns_target;
|
||||
|
||||
if(has_opt) {
|
||||
|
|
|
|||
19
src/subnet.c
19
src/subnet.c
|
|
@ -387,7 +387,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) {
|
|||
|
||||
bool net2str(char *netstr, int len, const subnet_t *subnet) {
|
||||
if(!netstr || !subnet) {
|
||||
logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!", netstr, subnet);
|
||||
logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!", (void *)netstr, (void *)subnet);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -592,9 +592,9 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) {
|
|||
|
||||
// Prepare environment variables to be passed to the script
|
||||
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
|
||||
xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
|
||||
xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
|
||||
xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
|
||||
xasprintf(&envp[3], "NODE=%s", owner->name);
|
||||
xasprintf(&envp[4], "NAME=%s", myself->name);
|
||||
|
||||
|
|
@ -627,13 +627,8 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) {
|
|||
}
|
||||
|
||||
// Prepare the SUBNET and WEIGHT variables
|
||||
if(envp[5]) {
|
||||
free(envp[5]);
|
||||
}
|
||||
|
||||
if(envp[6]) {
|
||||
free(envp[6]);
|
||||
}
|
||||
free(envp[5]);
|
||||
free(envp[6]);
|
||||
|
||||
xasprintf(&envp[5], "SUBNET=%s", netstr);
|
||||
xasprintf(&envp[6], "WEIGHT=%s", weight);
|
||||
|
|
@ -659,7 +654,7 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) {
|
|||
}
|
||||
}
|
||||
|
||||
for(i = 0; envp[i] && i < 9; i++) {
|
||||
for(i = 0; i < 9; i++) {
|
||||
free(envp[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
src/tincd.c
34
src/tincd.c
|
|
@ -434,7 +434,10 @@ static bool keygen(int bits) {
|
|||
BN_GENCB_set(cb, indicator, NULL);
|
||||
|
||||
rsa_key = RSA_new();
|
||||
BN_hex2bn(&e, "10001");
|
||||
|
||||
if(BN_hex2bn(&e, "10001") == 0) {
|
||||
abort();
|
||||
}
|
||||
|
||||
if(!rsa_key || !e) {
|
||||
abort();
|
||||
|
|
@ -559,25 +562,11 @@ static void make_names(void) {
|
|||
}
|
||||
|
||||
static void free_names() {
|
||||
if(identname) {
|
||||
free(identname);
|
||||
}
|
||||
|
||||
if(netname) {
|
||||
free(netname);
|
||||
}
|
||||
|
||||
if(pidfilename) {
|
||||
free(pidfilename);
|
||||
}
|
||||
|
||||
if(logfilename) {
|
||||
free(logfilename);
|
||||
}
|
||||
|
||||
if(confbase) {
|
||||
free(confbase);
|
||||
}
|
||||
free(identname);
|
||||
free(netname);
|
||||
free(pidfilename);
|
||||
free(logfilename);
|
||||
free(confbase);
|
||||
}
|
||||
|
||||
static bool drop_privs() {
|
||||
|
|
@ -698,7 +687,10 @@ int main(int argc, char **argv) {
|
|||
|
||||
/* Slllluuuuuuurrrrp! */
|
||||
|
||||
RAND_load_file("/dev/urandom", 1024);
|
||||
if(RAND_load_file("/dev/urandom", 1024) != 1024) {
|
||||
logger(LOG_ERR, "Error initializing RNG!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ENGINE_load_builtin_engines();
|
||||
ENGINE_register_all_complete();
|
||||
|
|
|
|||
|
|
@ -181,10 +181,7 @@ void close_device(void) {
|
|||
unlink(device);
|
||||
|
||||
free(device);
|
||||
|
||||
if(iface) {
|
||||
free(iface);
|
||||
}
|
||||
free(iface);
|
||||
}
|
||||
|
||||
static bool read_packet(vpn_packet_t *packet) {
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ void bin2hex(char *src, char *dst, int length) {
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_MINGW) || defined(HAVE___CYGWIN32__)
|
||||
#ifdef HAVE___CYGWIN32__
|
||||
#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN)
|
||||
#ifdef HAVE_CYGWIN
|
||||
#include <w32api/windows.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,11 @@
|
|||
extern bool hex2bin(char *src, char *dst, int length);
|
||||
extern void bin2hex(char *src, char *dst, int length);
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN)
|
||||
extern const char *winerror(int);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
|
||||
#define sockerrno WSAGetLastError()
|
||||
#define sockstrerror(x) winerror(x)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define TINC_XALLOC_H
|
||||
|
||||
/*
|
||||
xalloc.h -- malloc and related fuctions with out of memory checking
|
||||
xalloc.h -- malloc and related functions with out of memory checking
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
Copyright (C) 2011-2017 Guus Sliepen <guus@tinc-vpn.org>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue