summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/lcp_opt_mru.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ppp/lcp_opt_mru.c')
-rw-r--r--accel-pppd/ppp/lcp_opt_mru.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/accel-pppd/ppp/lcp_opt_mru.c b/accel-pppd/ppp/lcp_opt_mru.c
index 486ade7b..2f321fb6 100644
--- a/accel-pppd/ppp/lcp_opt_mru.c
+++ b/accel-pppd/ppp/lcp_opt_mru.c
@@ -27,6 +27,7 @@ static int mru_send_conf_nak(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, ui
static int mru_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr);
static int mru_recv_conf_ack(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr);
static int mru_recv_conf_nak(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr);
+static int mru_recv_conf_rej(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr);
static void mru_print(void (*print)(const char *fmt, ...), struct lcp_option_t*, uint8_t *ptr);
struct mru_option_t
@@ -35,6 +36,7 @@ struct mru_option_t
int mru;
int mtu;
int naked:1;
+ int rejected:1;
};
static struct lcp_option_handler_t mru_opt_hnd=
@@ -45,6 +47,7 @@ static struct lcp_option_handler_t mru_opt_hnd=
.recv_conf_req = mru_recv_conf_req,
.recv_conf_ack = mru_recv_conf_ack,
.recv_conf_nak = mru_recv_conf_nak,
+ .recv_conf_rej = mru_recv_conf_rej,
.free = mru_free,
.print = mru_print,
};
@@ -81,7 +84,7 @@ static int mru_send_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, ui
struct mru_option_t *mru_opt = container_of(opt, typeof(*mru_opt), opt);
struct lcp_opt16_t *opt16 = (struct lcp_opt16_t*)ptr;
- if (mru_opt->naked)
+ if (mru_opt->naked || mru_opt->rejected)
return 0;
opt16->hdr.id = CI_MRU;
@@ -141,6 +144,13 @@ static int mru_recv_conf_nak(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, ui
mru_opt->naked = 1;
return 0;
}
+static int mru_recv_conf_rej(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr)
+{
+ struct mru_option_t *mru_opt = container_of(opt, typeof(*mru_opt), opt);
+
+ mru_opt->rejected = 1;
+ return 0;
+}
static void mru_print(void (*print)(const char *fmt, ...), struct lcp_option_t *opt, uint8_t *ptr)
{