From fa3201d982100b5168f155f7c544f4fc902079d7 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 31 Jul 2025 01:28:54 +0100 Subject: [PATCH] New upstream version 6.0.24.78+repack --- Bpq32.c | 5 +++-- L2Code.c | 8 +++++++- L4Code.c | 5 ++--- PG/Loop.obj | Bin 716 -> 0 bytes PG/PGTest.obj | Bin 2284 -> 0 bytes Versions.h | 4 ++-- makefile | 34 +++++++++++++++++++++++++++------- upnp.c | 10 ++-------- 8 files changed, 43 insertions(+), 23 deletions(-) delete mode 100644 PG/Loop.obj delete mode 100644 PG/PGTest.obj diff --git a/Bpq32.c b/Bpq32.c index 9ca6ea5..aafa0e3 100644 --- a/Bpq32.c +++ b/Bpq32.c @@ -1276,8 +1276,9 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses // Fix KAM Pactor Interlock (73) // Fix Node map reporting, broken in .73 (74) // Fixes to build on FreeBSD and NetBSD from jg1uaa (77) -// Fix to L4Compress from Stece G7TAJ (77) - +// Fix to L4Compress from Steve G7TAJ (77) +// Fix possible FRMR when RNR is cleared by SREJ (78) +// Fix error in .77 L4Compress fix (mine, not Steve's!) (78) #define CKernel diff --git a/L2Code.c b/L2Code.c index 76924bf..440c238 100644 --- a/L2Code.c +++ b/L2Code.c @@ -3281,7 +3281,7 @@ VOID L2TimerProc() LINK->L2ACKREQ = 0; // CLEAR ANY DELAYED ACK TIMER - if (LINK->L2RETRIES == 0) // IF RR(P) OUTSTANDING WILl REPORT ANYWAY + if (LINK->L2RETRIES == 0) // IF RR(P) OUTSTANDING WILL REPORT ANYWAY { SendSupervisCmd(LINK); LINK++; @@ -3904,6 +3904,7 @@ UINT RR_OR_RNR(struct _LINKTABLE * LINK) { UCHAR Temp; TRANSPORTENTRY * Session; + int SaveRNRSent = LINK->L2FLAGS & RNRSENT; LINK->L2FLAGS &= ~RNRSENT; @@ -3979,6 +3980,11 @@ stayinREJ2: // if we support SREJ send that instesd or REJ + // Dont send SREJ if clearing RNR - causes FRMR + + if (SaveRNRSent) + return REJ; + if (LINK->Ver2point2) // We only allow 2.2 with SREJ Multi return SREJ; else diff --git a/L4Code.c b/L4Code.c index 703168a..f6fdb79 100644 --- a/L4Code.c +++ b/L4Code.c @@ -824,9 +824,8 @@ VOID L4BG() int Len = bytesleft; if (Len > ChunkSize) Len = ChunkSize; - - complen = L2Compressit(Compressed, 8192, toCompress, Len); - + + complen = L2Compressit(Compressed, 8192, CompressPtr, Len); Debugprintf("Chunked %d %d %d%%", Len, complen, ((Len - complen) * 100) / Len); sendChunk(L4, Compressed, complen, savePort); diff --git a/PG/Loop.obj b/PG/Loop.obj deleted file mode 100644 index f9d68d3221f0f2d3d169e84d3d653834afdf5a97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 716 zcmeZaWMR1Rq%7qjBLf2u0|e-$6s0DYl%+zs46#7Q78nOca|tl$rKBd6rmFS7#I#h)xZV0 zfNB*K^j%!t97BCVd_0}3luAo8Q}l8&laz=O25NEk4M9`u@8ja<=<6D+q`(5S=_3%g z0gbL(&MKf0zc zb^ohg=~Iygr=!@P39*4xf`CIZ&>+3cl*O4WjQ{^LFfcPXq@^a7=ouJHWMpW7h#*He zD7={&K~athkRzK3D8)B*<+1^}emi2VQn diff --git a/PG/PGTest.obj b/PG/PGTest.obj deleted file mode 100644 index c97914cb68fa8bdd31f0ed48b6a872375a3b994b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2284 zcmaJ?|4$rM5TETGa1zoUdX-YEJ}9Scz$+Cj0!FUowov8D@#TIXIkFsgd$4eKd%fGE zVysqAqI5&7sYzosu}%9A^al+!F;Xzm^e3Abe#RKJgvP{Q4AC<<^LCf+QS~J=JNuc> z%zOLZ?7Tj~1^%CA;>%?KUND9)o|R+TjBLKb5j2Jc>&<*ty1^Hh$MX{nLzd?wGzvR- zesG`gY4U4YLn>|Yt{|so7r;%2f$YTxgV5McUM1yo0xY1=pw!I$Fz+zpmyxq%@-X$k z@;VUz0Xe(zTWM_b;!!PXKwOWZt~WUr?1$zhUu<$ZcdXTdz>n5DJ9vPLW{e#Ph$oMS z`-b~Yo#?1X)g2tJF9rMi0;i7$#i4petNtD3J(N=*RO17>J0jtnoXtgEQ76-p{8J_Q}{QZ>{ARKR24hU*G! zKZ8mvtLD^%#tsc0X8jpWNhz-@=?R9}GD=d;0)+MZh5N2WTH4(;Jy@lCgu#2Xu);Ua zd2zFFZWHp2+KwZPJ_fbE|u?5sd#5J^@;@Ib?4c$RmEyk96%W#Pqj-R!rhms{7Vm;sWgPjy6zE~s;FNF=y;Q(f`MI%@@lXiW z#ZB7WS~T~dc=&Q3o-z|KKOLz>VBV9UKDn^wMGP=F}M-0`>FKVein?yd47daw^A=ymipv z+BtNf4uQ6TW{nSCJ!5oTJBR)Whd@1?W_|0XxA9>P{l^Z0%A7df)nD!y7QO(@LBoj^ zKwhKNxWN%AlhoQEIZN${vF7R5ZHmVLvJb4)(o^GwmfY|A+n9w??U<#hu}wDIxga?BuPm%7ER*L z#1&P_@LiQuymQoaj=a%WR+AKUTuS8AF#-%C7ByaM(oDjLK!;^YN$8U3(!vBonwpJH T$o{UQU0we-k>B6$Z-;*XDAvp1 diff --git a/Versions.h b/Versions.h index 061e9eb..17f1dfe 100644 --- a/Versions.h +++ b/Versions.h @@ -10,8 +10,8 @@ #endif -#define KVers 6,0,24,77 -#define KVerstring "6.0.24.77\0" +#define KVers 6,0,24,78 +#define KVerstring "6.0.24.78\0" #ifdef CKernel diff --git a/makefile b/makefile index cdb6298..0152c9a 100644 --- a/makefile +++ b/makefile @@ -19,7 +19,11 @@ OBJS = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pn #Default to Linux CC = gcc - EXTRA_LDFLAGS = -Xlinker -Map=output.map -lrt -l:libpaho-mqtt3a.a -l:libjansson.a + LDFLAGS = -Xlinker -Map=output.map -lrt + +all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS) +all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lm -lz -lpthread -lconfig -lpcap +all: linbpq #other OS @@ -27,34 +31,50 @@ OS_NAME = $(shell uname -s) ifeq ($(OS_NAME),NetBSD) CC = cc EXTRA_CFLAGS = -DFREEBSD -DNOMQTT -I/usr/pkg/include - EXTRA_LDFLAGS = -Xlinker -Map=output.map -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lrt -lutil -lexecinfo + LDFLAGS = -Xlinker -Map=output.map -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lrt -lutil -lexecinfo + +all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS) +all: LIBS = -lminiupnpc -lm -lz -lpthread -lconfig -lpcap +all: linbpq + + endif ifeq ($(OS_NAME),FreeBSD) CC = cc EXTRA_CFLAGS = -DFREEBSD -DNOMQTT -I/usr/local/include - EXTRA_LDFLAGS = -Xlinker -Map=output.map -L/usr/local/lib -lrt -liconv -lutil -lexecinfo + LDFLAGS = -Xlinker -Map=output.map -L/usr/local/lib -lrt -liconv -lutil -lexecinfo + +all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS) +all: LIBS = -lminiupnpc -lm -lz -lpthread -lconfig -lpcap +all: linbpq + endif + ifeq ($(OS_NAME),Darwin) CC = gcc EXTRA_CFLAGS = -DMACBPQ -DNOMQTT - EXTRA_LDFLAGS = -liconv + LDFLAGS = -liconv + +all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS) +all: LIBS = -lminiupnpc -lm -lz -lpthread -lconfig -lpcap +all: linbpq endif $(info OS_NAME is $(OS_NAME)) -all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS) -all: linbpq nomqtt: CFLAGS = -DLINBPQ -MMD -fcommon -g -rdynamic -DNOMQTT -fasynchronous-unwind-tables +nomqtt: LIBS = -lminiupnpc -lm -lz -lpthread -lconfig -lpcap nomqtt: linbpq noi2c: CFLAGS = -DLINBPQ -MMD -DNOI2C -g -rdynamic -fcommon -fasynchronous-unwind-tables +noi2c: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lm -lz -lpthread -lconfig -lpcap noi2c: linbpq linbpq: $(OBJS) - cc $(OBJS) $(EXTRA_LDFLAGS) -lminiupnpc -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq + cc $(OBJS) $(CFLAGS) $(LDFLAGS) $(LIBS) -o linbpq sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq -include *.d diff --git a/upnp.c b/upnp.c index 714e04d..fa855f8 100644 --- a/upnp.c +++ b/upnp.c @@ -41,7 +41,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #endif #ifdef LINBPQ -#ifndef MACBPQ #ifndef WIN32 #include #include @@ -49,13 +48,8 @@ POSSIBILITY OF SUCH DAMAGE. #include #endif #endif -#endif -#ifdef MACBPQ -#include -#include -#include -#include -#endif + + int AddMap(char * controlURL, char * eport, char * iport, char * proto); int DeleteMap(char * controlURL, char * eport, char * iport, char * proto);