diff options
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/main.c | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_fsm.c | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_fsm.h | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/accel-pppd/main.c b/accel-pppd/main.c index 2992026c..ecffb7c1 100644 --- a/accel-pppd/main.c +++ b/accel-pppd/main.c @@ -283,6 +283,8 @@ int main(int _argc, char **_argv) sleep(1); } + srandom(time(NULL)); + if (triton_init(conf_file)) _exit(EXIT_FAILURE); diff --git a/accel-pppd/ppp/ppp_fsm.c b/accel-pppd/ppp/ppp_fsm.c index bb45d5cb..c884143c 100644 --- a/accel-pppd/ppp/ppp_fsm.c +++ b/accel-pppd/ppp/ppp_fsm.c @@ -36,7 +36,7 @@ void ppp_fsm_init(struct ppp_fsm_t *layer) layer->max_configure = conf_max_configure; layer->max_failure = conf_max_failure; - layer->id = 1; + layer->id = random(); } void ppp_fsm_free(struct ppp_fsm_t *layer) { diff --git a/accel-pppd/ppp/ppp_fsm.h b/accel-pppd/ppp/ppp_fsm.h index 6208d9ad..60b8aadb 100644 --- a/accel-pppd/ppp/ppp_fsm.h +++ b/accel-pppd/ppp/ppp_fsm.h @@ -36,8 +36,8 @@ struct ppp_fsm_t int max_failure; int conf_failure; - int id; - int recv_id; + uint8_t id; + uint8_t recv_id; //fsm handling void (*layer_up)(struct ppp_fsm_t*); |