diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-30 07:52:44 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-30 07:52:44 +0300 |
commit | 07be95a20d64451cd6b28ac1b79bfff05ab3700f (patch) | |
tree | 80ca4c206572e31eb234b9dbf19888b00db030b2 /net-dialup/ppp/files | |
parent | 59dc52cd088fbfd2252277abd44d7318a5c4d4d7 (diff) |
patched for pause between reconnect ppp (for my needs, maybe useful for someone else)
Diffstat (limited to 'net-dialup/ppp/files')
-rw-r--r-- | net-dialup/ppp/files/README.mpls | 15 | ||||
-rw-r--r-- | net-dialup/ppp/files/modules.ppp | 10 | ||||
-rw-r--r-- | net-dialup/ppp/files/ppp_pause_between_reconnect.patch | 73 |
3 files changed, 98 insertions, 0 deletions
diff --git a/net-dialup/ppp/files/README.mpls b/net-dialup/ppp/files/README.mpls new file mode 100644 index 0000000..1ae7ae4 --- /dev/null +++ b/net-dialup/ppp/files/README.mpls @@ -0,0 +1,15 @@ +MPLS consists of 3 components: +1. MPLS forwarding +2. MPLS signalling +3. Mapping layer 3 traffic onto MPLS LSPs + +The document mpls-forwarding basics explains item 1. + +Examples of MPLS signalling protocols are: RSVP-TE LDP and CR-LDP. +The package ldp-portable is an implementation of LDP and contains more +information about LDP based MPLS signalling. + +Mapping of layer 3 traffic to MPLS LSPs is accomplised in a couple of +different ways. +-Per FEC where FEC is an entry in the routing table +-Virtual interface that represents an LSP diff --git a/net-dialup/ppp/files/modules.ppp b/net-dialup/ppp/files/modules.ppp new file mode 100644 index 0000000..e936041 --- /dev/null +++ b/net-dialup/ppp/files/modules.ppp @@ -0,0 +1,10 @@ +alias char-major-108 ppp_generic +alias /dev/ppp ppp_generic +alias tty-ldisc-3 ppp_async +alias tty-ldisc-13 n_hdlc +alias tty-ldisc-14 ppp_synctty +alias ppp-compress-18 ppp_mppe +alias ppp-compress-21 bsd_comp +alias ppp-compress-24 ppp_deflate +alias ppp-compress-26 ppp_deflate +alias net-pf-24 pppoe diff --git a/net-dialup/ppp/files/ppp_pause_between_reconnect.patch b/net-dialup/ppp/files/ppp_pause_between_reconnect.patch new file mode 100644 index 0000000..3507593 --- /dev/null +++ b/net-dialup/ppp/files/ppp_pause_between_reconnect.patch @@ -0,0 +1,73 @@ +diff -Naur ppp-2.4.5/pppd/main.c ppp-2.4.5_patched/pppd/main.c +--- ppp-2.4.5/pppd/main.c 2010-08-30 07:36:35.000000000 +0300 ++++ ppp-2.4.5_patched/pppd/main.c 2010-08-30 07:41:10.844666729 +0300 +@@ -565,6 +565,8 @@ + + if (!persist || asked_to_quit || (maxfail > 0 && unsuccess >= maxfail)) + break; ++ else ++ sleep(pause_between_reconnect); + + if (demand) + demand_discard(); +@@ -581,6 +583,8 @@ + } while (phase == PHASE_HOLDOFF); + if (!persist) + break; ++ else ++ sleep(pause_between_reconnect); + } + + wait_children(); +diff -Naur ppp-2.4.5/pppd/options.c ppp-2.4.5_patched/pppd/options.c +--- ppp-2.4.5/pppd/options.c 2010-08-30 07:36:35.000000000 +0300 ++++ ppp-2.4.5_patched/pppd/options.c 2010-08-30 07:44:05.162666733 +0300 +@@ -101,6 +101,7 @@ + char user[MAXNAMELEN]; /* Username for PAP */ + char passwd[MAXSECRETLEN]; /* Password for PAP */ + bool persist = 0; /* Reopen link after it goes down */ ++int pause_between_reconnect = 5; /* set pause between reconnects to avoid log flood/high cpu usage */ + bool killoldaddr = 0; /* If our IP is reassigned on + reconnect, kill active TCP + connections using the old IP. */ +@@ -229,6 +230,8 @@ + + { "persist", o_bool, &persist, + "Keep on reopening connection after close", OPT_PRIO | 1 }, ++ { "pause_between_reconnects", o_int, &pause_between_reconnect, ++ "set pause between reconnects to avoid log flood/high cpu usage", OPT_PRIO }, + { "nopersist", o_bool, &persist, + "Turn off persist option", OPT_PRIOSUB }, + +diff -Naur ppp-2.4.5/pppd/pppd.h ppp-2.4.5_patched/pppd/pppd.h +--- ppp-2.4.5/pppd/pppd.h 2010-08-30 07:36:35.000000000 +0300 ++++ ppp-2.4.5_patched/pppd/pppd.h 2010-08-30 07:44:39.502666729 +0300 +@@ -294,6 +294,7 @@ + extern char passwd[MAXSECRETLEN]; /* Password for PAP or CHAP */ + extern bool auth_required; /* Peer is required to authenticate */ + extern bool persist; /* Reopen link after it goes down */ ++extern int pause_between_reconnect; /* set pause between reconnects to avoid log flood/high cpu usage */ + extern bool uselogin; /* Use /etc/passwd for checking PAP */ + extern bool session_mgmt; /* Do session management (login records) */ + extern char our_name[MAXNAMELEN];/* Our name for authentication purposes */ +diff -Naur ppp-2.4.5/pppd/tty.c ppp-2.4.5_patched/pppd/tty.c +--- ppp-2.4.5/pppd/tty.c 2009-11-17 00:26:07.000000000 +0200 ++++ ppp-2.4.5_patched/pppd/tty.c 2010-08-30 07:42:39.874666731 +0300 +@@ -582,6 +582,8 @@ + } + if (!persist || err != EINTR) + goto errret; ++ else ++ sleep(pause_between_reconnects); + } + ttyfd = real_ttyfd; + if ((fdflags = fcntl(ttyfd, F_GETFL)) == -1 +@@ -731,6 +733,8 @@ + } + if (!persist || errno != EINTR || hungup || got_sigterm) + goto errret; ++ else ++ sleep(paus_between_reconnect); + } + close(i); + } |