1 diff -ruNp ppp-2.4.3.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.3/pppd/plugins/pppoatm/pppoatm.c
2 --- ppp-2.4.3.orig/pppd/plugins/pppoatm/pppoatm.c 2005-03-22 14:44:18.000000000 +0100
3 +++ ppp-2.4.3/pppd/plugins/pppoatm/pppoatm.c 2005-03-22 14:44:02.000000000 +0100
4 @@ -70,18 +70,20 @@ static int setdevname_pppoatm(const char
6 struct sockaddr_atmpvc addr;
7 extern struct stat devstat;
11 - //info("PPPoATM setdevname_pppoatm: '%s'", cp);
13 memset(&addr, 0, sizeof addr);
14 if (text2atm(cp, (struct sockaddr *) &addr, sizeof(addr),
15 T2A_PVC | T2A_NAME) < 0) {
17 - info("atm does not recognize: %s", cp);
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 @@ -179,16 +182,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 @@ -202,7 +208,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 @@ -210,9 +216,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,