diff --git a/net/mpd5/Makefile b/net/mpd5/Makefile index 58b5e00506f9..0c63072d8abc 100644 --- a/net/mpd5/Makefile +++ b/net/mpd5/Makefile @@ -1,65 +1,65 @@ PORTNAME= mpd DISTVERSION= 5.9 -PORTREVISION= 16 +PORTREVISION= 17 CATEGORIES= net MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION} PKGNAMESUFFIX= 5 DIST_SUBDIR= mpd5 MAINTAINER= eugen@FreeBSD.org COMMENT= Multi-link PPP daemon based on netgraph(4) WWW= https://sourceforge.net/projects/mpd/ LICENSE= BSD3CLAUSE USES= cpe CPE_VENDOR= mpd_project OPTIONS_DEFINE= DOCS NG_IPACCT RADIUS OPTIONS_DEFAULT= RADIUS NG_IPACCT_DESC= Use ng_ipacct kernel module from port RADIUS_DESC= Enable RADIUS support HAS_CONFIGURE= YES CONFIGURE_WRKSRC= "${WRKSRC}/src" .include MAKE_ARGS+= OSVERSION=${OSVERSION} .if ${PORT_OPTIONS:MNG_IPACCT} BUILD_DEPENDS+= ${LOCALBASE}/include/netgraph/ng_ipacct.h:net-mgmt/ng_ipacct .if exists(${KMODDIR}/ng_ipacct.ko) RUN_DEPENDS+= ${KMODDIR}/ng_ipacct.ko:net-mgmt/ng_ipacct .else RUN_DEPENDS+= /boot/modules/ng_ipacct.ko:net-mgmt/ng_ipacct .endif .else CONFIGURE_ENV+= USE_NG_IPACCT=no MAKE_ARGS+= USE_NG_IPACCT=no .endif .if ${PORT_OPTIONS:MRADIUS} PLIST_FILES= ${DATADIR}/dictionary.mpd post-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/conf/dictionary.mpd ${STAGEDIR}${DATADIR} .else CONFIGURE_ENV+= USE_RADIUS=no MAKE_ARGS+= USE_RADIUS=no .endif USE_RC_SUBR= mpd5 CONFSUF= conf secret script DOCSDIR= ${PREFIX}/share/doc/mpd5 PORTDOCS= README mpd* PLIST_FILES+= ${CONFSUF:C|(.*)|"@sample etc/mpd5/mpd.\1.sample"|} \ sbin/mpd5 .if !defined(WITHOUT_MAN) PLIST_FILES+= man/man8/mpd5.8.gz .endif .include diff --git a/net/mpd5/files/patch-ccp b/net/mpd5/files/patch-ccp new file mode 100644 index 000000000000..3055d4f84643 --- /dev/null +++ b/net/mpd5/files/patch-ccp @@ -0,0 +1,107 @@ +Index: ccp.h +=================================================================== +--- src/ccp.h (revision 2511) ++++ src/ccp.h (working copy) +@@ -39,7 +39,7 @@ + #define CCP_TY_PRED1 1 /* Predictor type 1 */ + #define CCP_TY_PRED2 2 /* Predictor type 2 */ + #define CCP_TY_PUDDLE 3 /* Puddle Jumper */ +- #define CCP_TY_HWPPC 16 /* Hewlett-Packard PPC */ ++ #define CCP_TY_HPPPC 16 /* Hewlett-Packard PPC */ + #define CCP_TY_STAC 17 /* Stac Electronics LZS */ + #define CCP_TY_MPPC 18 /* Microsoft PPC */ + #define CCP_TY_GAND 19 /* Gandalf FZA */ +@@ -50,6 +50,7 @@ + #define CCP_TY_DCE 25 /* Data Compression in Data Circuit-Terminating Equipment */ + #define CCP_TY_DEFLATE 26 /* Gzip "deflate" compression */ + #define CCP_TY_V44 27 /* V.44/LZJH Compression Protocol */ ++ #define CCP_TY_LASTKNOWN CCP_TY_V44 + + #define CCP_OVERHEAD 2 + +--- src/ccp.c.orig 2023-10-27 15:59:28.379182000 +0700 ++++ src/ccp.c 2023-10-27 16:00:57.038431000 +0700 +@@ -60,7 +60,7 @@ + static int CcpCheckEncryption(Bund b); + static int CcpSetCommand(Context ctx, int ac, const char *const av[], const void *arg); + static CompType CcpFindComp(int type, int *indexp); +- static const char *CcpTypeName(int type, char *buf, size_t len); ++ static const char *CcpTypeName(u_char type, char *buf, size_t len); + + static void CcpNgCtrlEvent(int type, void *cookie); + static void CcpNgDataEvent(int type, void *cookie); +@@ -132,28 +132,6 @@ + NULL, NULL, NULL, NULL + }; + +- /* Names for different types of compression */ +- static const struct ccpname { +- u_char type; +- const char *name; +- } gCcpTypeNames[] = { +- { CCP_TY_OUI, "OUI" }, +- { CCP_TY_PRED1, "PRED1" }, +- { CCP_TY_PRED2, "PRED2" }, +- { CCP_TY_PUDDLE, "PUDDLE" }, +- { CCP_TY_HWPPC, "HWPPC" }, +- { CCP_TY_STAC, "STAC" }, +- { CCP_TY_MPPC, "MPPC" }, +- { CCP_TY_GAND, "GAND" }, +- { CCP_TY_V42BIS, "V42BIS" }, +- { CCP_TY_BSD, "BSD" }, +- { CCP_TY_LZS_DCP, "LZS-DCP" }, +- { CCP_TY_MVRCA, "MVRCA" }, +- { CCP_TY_DCE, "DCE" }, +- { CCP_TY_DEFLATE, "DEFLATE" }, +- { CCP_TY_V44, "V.44/LZJH" }, +- { 0, NULL }, +- }; + + int gCcpCsock = -1; /* Socket node control socket */ + int gCcpDsock = -1; /* Socket node data socket */ +@@ -1107,17 +1085,35 @@ CcpFindComp(int type, int *indexp) + */ + + static const char * +-CcpTypeName(int type, char *buf, size_t len) +-{ +- const struct ccpname *p; ++CcpTypeName(u_char type, char *buf, size_t len) ++ { ++ /* Names for different types of compression */ ++ static const char * const ccpnames[] = { ++ "OUI", ++ "PRED1", ++ "PRED2", ++ "PUDDLE", ++ "HPPPC", ++ "STAC", ++ "MPPC", ++ "GAND", ++ "V42BIS", ++ "BSD", ++ "UNKNOWN[22]", ++ "LZS_DCP", ++ "MVRCA", ++ "DCE", ++ "DEFLATE", ++ "V.44/LZJH" ++ }; ++ if (type <= CCP_TY_PUDDLE) ++ return(ccpnames[type]); + +- for (p = gCcpTypeNames; p->name; p++) { +- if (p->type == type) { +- strlcpy(buf, p->name, len); +- return (buf); +- } +- } +- snprintf(buf, sizeof(buf), "UNKNOWN[%d]", type); ++ if (type >= CCP_TY_HPPPC && type <= CCP_TY_LASTKNOWN) ++ /* type - (CCP_TY_HPPPC-CCP_TY_PUDDLE-1) */ ++ return(ccpnames[type - 12]); ++ ++ snprintf(buf, len, "UNKNOWN[%u]", (unsigned)type); + return(buf); + } +