]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | --- ppp/pppd/plugins/pppoatm.c~ 2003-07-19 15:35:24.000000000 +0200 |
2 | +++ ppp/pppd/plugins/pppoatm.c 2003-07-19 15:42:26.000000000 +0200 | |
3 | @@ -32,6 +32,7 @@ | |
4 | static bool vc_encaps = 0; | |
5 | static int device_got_set = 0; | |
6 | static int pppoatm_max_mtu, pppoatm_max_mru; | |
7 | +static int pppoatmfd = -1; | |
8 | static int setdevname_pppoatm(const char *cp, const char **argv, int doit); | |
9 | struct channel pppoa_channel; | |
10 | ||
11 | @@ -173,9 +174,16 @@ | |
12 | pppoatm_max_mru = lcp_wantoptions[0].mru; | |
13 | set_line_discipline_pppoatm(fd); | |
14 | strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam)); | |
15 | + pppoatmfd = fd; /* need to save it for disconnect */ | |
16 | return fd; | |
17 | } | |
18 | ||
19 | +static void disconnect_pppoatm(void) | |
20 | +{ | |
21 | + close(pppoatmfd); | |
22 | + pppoatmfd = -1; | |
23 | +} | |
24 | + | |
25 | static void send_config_pppoa(int mtu, | |
26 | u_int32_t asyncmap, | |
27 | int pcomp, | |
28 | @@ -222,7 +230,7 @@ | |
29 | process_extra_options: NULL, | |
30 | check_options: NULL, | |
31 | connect: &connect_pppoatm, | |
32 | - disconnect: NULL, | |
33 | + disconnect: &disconnect_pppoatm, | |
34 | establish_ppp: &generic_establish_ppp, | |
35 | disestablish_ppp: &generic_disestablish_ppp, | |
36 | send_config: &send_config_pppoa, |