2009-05-21 10:49:21 +00:00
|
|
|
--- a/pppd/plugins/pppoatm/pppoatm.c
|
|
|
|
+++ b/pppd/plugins/pppoatm/pppoatm.c
|
2011-07-28 16:51:12 +00:00
|
|
|
@@ -75,13 +75,14 @@ static int setdevname_pppoatm(const char
|
|
|
|
//info("PPPoATM setdevname_pppoatm: '%s'", cp);
|
2009-05-20 22:36:38 +00:00
|
|
|
memset(&addr, 0, sizeof addr);
|
|
|
|
if (text2atm(cp, (struct sockaddr *) &addr, sizeof(addr),
|
|
|
|
- T2A_PVC | T2A_NAME) < 0) {
|
|
|
|
- if(doit)
|
|
|
|
- info("atm does not recognize: %s", cp);
|
|
|
|
+ T2A_PVC | T2A_NAME | T2A_WILDCARD) < 0) {
|
|
|
|
+ if (doit)
|
|
|
|
+ info("cannot parse the ATM address: %s", cp);
|
|
|
|
return 0;
|
|
|
|
- }
|
|
|
|
- if (!doit) return 1;
|
|
|
|
- //if (!dev_set_ok()) return -1;
|
|
|
|
+ }
|
|
|
|
+ if (!doit)
|
|
|
|
+ return 1;
|
|
|
|
+
|
|
|
|
memcpy(&pvcaddr, &addr, sizeof pvcaddr);
|
|
|
|
strlcpy(devnam, cp, sizeof devnam);
|
|
|
|
devstat.st_mode = S_IFSOCK;
|
2011-07-28 16:51:12 +00:00
|
|
|
@@ -170,7 +171,7 @@ static void disconnect_pppoatm(void)
|
2009-05-20 22:36:38 +00:00
|
|
|
|
|
|
|
void plugin_init(void)
|
|
|
|
{
|
|
|
|
-#if defined(__linux__)
|
|
|
|
+#ifdef linux
|
|
|
|
extern int new_style_driver; /* From sys-linux.c */
|
|
|
|
if (!ppp_available() && !new_style_driver)
|
|
|
|
fatal("Kernel doesn't support ppp_generic - "
|