aboutsummaryrefslogtreecommitdiffstats
path: root/packet-gre.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-25 07:42:26 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-25 07:42:26 +0000
commit40c5ed378fe8c500efe36717b4ef7fe9c30102f4 (patch)
treea6a26b30c3725ce60138c644de65403f85e9b6b1 /packet-gre.c
parent2a0cd3825428646d640b6ea27660bb5f4d05589b (diff)
Convert dissect_ppp() and friends to use tvbuffs.
(the ip_tcp_options stuff is still non-tvbuff until I convert ip and tcp). Add preliminary fix for Linux ISDN ippp devices (similar watch was posted to ethereal-users, but did not use tvbuffs). Change packet-raw.c to call capture_ppp()/dissect_ppp() in the case where the frame starts with FF:03. We had been calling capture_ip()/dissect_ip() at byte offset 4, but I think this is for historical reasons of packet-raw.c and packet-ip.c existing before packet-ppp.c. svn path=/trunk/; revision=1998
Diffstat (limited to 'packet-gre.c')
-rw-r--r--packet-gre.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-gre.c b/packet-gre.c
index 7af6b079a1..263aec7445 100644
--- a/packet-gre.c
+++ b/packet-gre.c
@@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-gre.c,v 1.20 2000/05/18 08:41:13 guy Exp $
+ * $Id: packet-gre.c,v 1.21 2000/05/25 07:42:24 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -81,6 +81,7 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
guint16 type = pntohs(pd + offset + sizeof(flags_and_ver));
guint16 sre_af;
guint8 sre_length;
+ tvbuff_t *next_tvb;
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "GRE");
@@ -205,7 +206,8 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
switch (type) {
case GRE_PPP:
- dissect_ppp(pd, offset, fd, tree);
+ next_tvb = tvb_new_subset(pi.compat_top_tvb, offset, -1, -1);
+ dissect_ppp(next_tvb, &pi, tree);
break;
case GRE_IP:
dissect_ip(pd, offset, fd, tree);