1 --- a/pppd/plugins/pppoatm/pppoatm.c
2 +++ b/pppd/plugins/pppoatm/pppoatm.c
3 @@ -70,18 +70,20 @@ static int setdevname_pppoatm(const char
5 struct sockaddr_atmpvc addr;
6 extern struct stat devstat;
10 - //info("PPPoATM setdevname_pppoatm: '%s'", cp);
12 memset(&addr, 0, sizeof addr);
13 if (text2atm(cp, (struct sockaddr *) &addr, sizeof(addr),
14 - T2A_PVC | T2A_NAME) < 0) {
16 - info("atm does not recognize: %s", cp);
17 + T2A_PVC | T2A_NAME | T2A_WILDCARD) < 0) {
19 + info("cannot parse the ATM address: %s", cp);
22 - if (!doit) return 1;
23 - //if (!dev_set_ok()) return -1;
28 memcpy(&pvcaddr, &addr, sizeof pvcaddr);
29 strlcpy(devnam, cp, sizeof devnam);
30 devstat.st_mode = S_IFSOCK;
31 @@ -93,7 +95,6 @@ static int setdevname_pppoatm(const char
32 lcp_allowoptions[0].neg_asyncmap = 0;
33 lcp_wantoptions[0].neg_pcompression = 0;
35 - info("PPPoATM setdevname_pppoatm - SUCCESS:%s", cp);
39 @@ -108,6 +109,7 @@ static void no_device_given_pppoatm(void
40 static void set_line_discipline_pppoatm(int fd)
42 struct atm_backend_ppp be;
44 be.backend_num = ATM_BACKEND_PPP;
46 be.encaps = PPPOATM_ENCAPS_VC;
47 @@ -115,6 +117,7 @@ static void set_line_discipline_pppoatm(
48 be.encaps = PPPOATM_ENCAPS_LLC;
50 be.encaps = PPPOATM_ENCAPS_AUTODETECT;
52 if (ioctl(fd, ATM_SETBACKEND, &be) < 0)
53 fatal("ioctl(ATM_SETBACKEND): %m");
55 @@ -175,16 +178,19 @@ static void send_config_pppoa(int mtu,
60 if (mtu > pppoatm_max_mtu)
61 error("Couldn't increase MTU to %d", mtu);
63 sock = socket(AF_INET, SOCK_DGRAM, 0);
65 fatal("Couldn't create IP socket: %m");
67 strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
69 if (ioctl(sock, SIOCSIFMTU, (caddr_t) &ifr) < 0)
70 fatal("ioctl(SIOCSIFMTU): %m");
71 - (void) close (sock);
75 static void recv_config_pppoa(int mru,
76 @@ -198,7 +204,7 @@ static void recv_config_pppoa(int mru,
78 void plugin_init(void)
80 -#if defined(__linux__)
82 extern int new_style_driver; /* From sys-linux.c */
83 if (!ppp_available() && !new_style_driver)
84 fatal("Kernel doesn't support ppp_generic - "
85 @@ -206,9 +212,9 @@ void plugin_init(void)
87 fatal("No PPPoATM support on this OS");
89 - info("PPPoATM plugin_init");
90 add_options(pppoa_options);
93 struct channel pppoa_channel = {
94 options: pppoa_options,
95 process_extra_options: NULL,