gatppp: fix ppp protocol-reject constructing error
authorCaiwen Zhang <caiwen.zhang@windriver.com>
Wed, 11 May 2011 08:15:19 +0000 (16:15 +0800)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 11 May 2011 18:29:30 +0000 (13:29 -0500)
commit37d04bee15cf2e339de04ecb26031b11b7fe28f5
tree80ab1abecf59e5d9a4c372027424ac11bb2c4d78
parent652f2963ae82f6dfd202b514fd364a307a19b82c
gatppp: fix ppp protocol-reject constructing error

In PPP Protocol-Reject package the 'rejected data field' should be a copy
of the rejected package, the copy starts from the data field. besides,
Protocol-Reject package include a 'rejected protocol field', it is the
same as the protocol field of the rejected package.

Protocol-Reject package structure is:

| PPP_header | rejected protocol | rejected data

The rejected package structure is:
| Addr | Control | protocol | data

So the Protocol-Reject package data field is copied from the 3rd byte of
the rejected package.
gatchat/ppp_cp.c