summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2007-08-07 17:15:14 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2007-08-07 17:15:14 +0000
commit23ed118b0c2fb68c704121948e97ec148b1f6b41 (patch)
treeef7a5d7d271a09ff6815579a052489e6f8b2ff9b /sys
parent808847db08cd382dd5a8e893f1935625eb2680b8 (diff)
Use the length of the mbuf instead of the packet.
When sending a protocol reject. Prevents reading past the mbuf in case the mbuf does not cover the whole packet. ok claudio@, henning@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_spppsubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index f434fbb5c79..b5d7c1f5a5b 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.52 2007/06/06 10:04:36 henning Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.53 2007/08/07 17:15:13 canacar Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -500,7 +500,7 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
default:
if (sp->state[IDX_LCP] == STATE_OPENED)
sppp_cp_send (sp, PPP_LCP, PROTO_REJ,
- ++sp->pp_seq, m->m_pkthdr.len + 2, prej);
+ ++sp->pp_seq, m->m_len + 2, prej);
if (debug)
log(LOG_DEBUG,
SPP_FMT "invalid input protocol "