X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=pppd%2Fplugins%2Fpppoatm%2Fpppoatm.c;h=5ac03c8483d66e44f40da04f1ab7f7290b3a72c0;hb=d2330632fd4bdab5cf89bfdcce45eefd6fe34b97;hp=09cd0b8bfb0142524d12c15971f8e13844e7e6b0;hpb=032020241d270c53dff479a7b0eb7fe487c56a78;p=ppp.git diff --git a/pppd/plugins/pppoatm/pppoatm.c b/pppd/plugins/pppoatm/pppoatm.c index 09cd0b8..5ac03c8 100644 --- a/pppd/plugins/pppoatm/pppoatm.c +++ b/pppd/plugins/pppoatm/pppoatm.c @@ -13,25 +13,25 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#ifdef HAVE_CONFIG_H -#include -#endif #include #include #include -#include "pppd.h" -#include "pathnames.h" -#include "fsm.h" /* Needed for lcp.h to include cleanly */ -#include "lcp.h" #include #include #include #include #include #include +#include + +#include +#include +#include /* Needed for lcp.h to include cleanly */ +#include + -const char pppd_version[] = VERSION; +const char pppd_version[] = PPPD_VERSION; static struct sockaddr_atmpvc pvcaddr; static char *qosstr = NULL; @@ -89,7 +89,7 @@ static int setdevname_pppoatm(const char *cp, const char **argv, int doit) return 1; memcpy(&pvcaddr, &addr, sizeof pvcaddr); - strlcpy(devnam, cp, sizeof devnam); + strlcpy(devnam, cp, MAXPATHLEN); devstat.st_mode = S_IFSOCK; if (the_channel != &pppoa_channel) { the_channel = &pppoa_channel; @@ -163,7 +163,7 @@ static int connect_pppoatm(void) pppoatm_max_mtu = lcp_allowoptions[0].mru; pppoatm_max_mru = lcp_wantoptions[0].mru; set_line_discipline_pppoatm(fd); - strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam)); + strlcpy(ppp_devnam, devnam, MAXPATHLEN); pppoa_fd = fd; return fd; }