diff options
author | Daniel Black <dragonheart@gentoo.org> | 2006-04-25 13:07:15 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2006-04-25 13:07:15 +0000 |
commit | fd55daa553d55a498a71f5b66af3f9fb5e399160 (patch) | |
tree | 12c7bdc066b649eb25c5fb998268f47c56c43f58 /net-analyzer/ethereal | |
parent | version bump - multiple vulnerabilities in protocol dissectors - bug #130505. (diff) | |
download | gentoo-2-fd55daa553d55a498a71f5b66af3f9fb5e399160.tar.gz gentoo-2-fd55daa553d55a498a71f5b66af3f9fb5e399160.tar.bz2 gentoo-2-fd55daa553d55a498a71f5b66af3f9fb5e399160.zip |
version bump - multiple vulnerabilities in protocol dissectors - bug #130505.
(Portage version: 2.1_pre9-r4)
(Signed Manifest commit)
Diffstat (limited to 'net-analyzer/ethereal')
5 files changed, 34 insertions, 727 deletions
diff --git a/net-analyzer/ethereal/Manifest b/net-analyzer/ethereal/Manifest index ce03bdba037f..d6f3834a08a1 100644 --- a/net-analyzer/ethereal/Manifest +++ b/net-analyzer/ethereal/Manifest @@ -1,46 +1,49 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 2b2f0732aaf8ea8220bb7f8991c4b158 ChangeLog 15783 -RMD160 3af2f95a53967765c246915aefc0f5a9436cf821 ChangeLog 15783 -SHA256 f663a887046e891c717a35a40cb46a75eddeaffa946c24a42cb2c68baf62ccbf ChangeLog 15783 -MD5 b351bb6638fe4279a26c3f570c9dd30b ethereal-0.10.13-r2.ebuild 3787 -RMD160 a83d6df6f49b7ecbb9e97323ae31f33b0ef93460 ethereal-0.10.13-r2.ebuild 3787 -SHA256 c8f845c881b092d96980e5e70a4c524926788cbdaa312d2414cac2e071134bfe ethereal-0.10.13-r2.ebuild 3787 -MD5 37e925f02777b6168f6aad1db53116ec ethereal-0.10.14-r1.ebuild 3814 -RMD160 d98d22045ff4b6bfe509923cf292df1a952d8eeb ethereal-0.10.14-r1.ebuild 3814 -SHA256 61feaf092e58a06c8699711a9662b3def73295e2e36c3225b86d9eda6769552a ethereal-0.10.14-r1.ebuild 3814 -MD5 eeb4a9b83362b84c0348c0d07a199818 ethereal-0.10.14.ebuild 3576 -RMD160 ecf41482a4ff4829e952e1c4ae60c2552e677254 ethereal-0.10.14.ebuild 3576 -SHA256 209920ddc054e769197ab637b4b2b163e1bed9dc1b206cfd12f786a07801e275 ethereal-0.10.14.ebuild 3576 -MD5 ce9e77144029b2f1104aa92c1927f4e9 files/digest-ethereal-0.10.13-r2 70 -RMD160 57e5680a94e4aa85a396149d9d120f23fddfdad8 files/digest-ethereal-0.10.13-r2 70 -SHA256 9c5500f7d48bd2fdccba3431617baf5b1cef4ce27e101fc56769b33ce8801d65 files/digest-ethereal-0.10.13-r2 70 -MD5 006b9cf78002e82c2bb4e279f50e3429 files/digest-ethereal-0.10.14 70 -RMD160 e4164478726ab1853424e9a868a4053b3d10fb3b files/digest-ethereal-0.10.14 70 -SHA256 b28d0a35347c966bddc8f37fc838abdc566cf5011c08ee281f89ce234937a039 files/digest-ethereal-0.10.14 70 -MD5 006b9cf78002e82c2bb4e279f50e3429 files/digest-ethereal-0.10.14-r1 70 -RMD160 e4164478726ab1853424e9a868a4053b3d10fb3b files/digest-ethereal-0.10.14-r1 70 -SHA256 b28d0a35347c966bddc8f37fc838abdc566cf5011c08ee281f89ce234937a039 files/digest-ethereal-0.10.14-r1 70 -MD5 e58b082ef143490cd14bbd423d5e7f4d files/ethereal-0.10.13-fix-irc-loop-DoS-CVE-2005-3313.diff 612 -RMD160 92947293dabf3afe870b12d1df6771720c7c37fe files/ethereal-0.10.13-fix-irc-loop-DoS-CVE-2005-3313.diff 612 -SHA256 a6a75b5b90650af3f06e5f8234959410f02c8c725cc3a86d869ece1fab399d29 files/ethereal-0.10.13-fix-irc-loop-DoS-CVE-2005-3313.diff 612 -MD5 c334d7d6daae506c1e3a9a61d892a00c files/ethereal-0.10.13-packet-ospf.diff 18115 -RMD160 9607e8a4ad3676b6873acdd26aa994ad77558c08 files/ethereal-0.10.13-packet-ospf.diff 18115 -SHA256 8b654d145d9bea0f3e9e79accfc6efa031086b4816950073a2c6cbd4e249d28a files/ethereal-0.10.13-packet-ospf.diff 18115 +AUX ethereal-0.10.14-asneeded.patch 847 RMD160 83896f31fb4b84940f17cb48a70073e849968543 SHA1 c0f3107923cfb66df5c5191ba5308ec07f72dc4d SHA256 2815e1f321400e74c01953a72b330e6080a5b65a5360d594ceeb8b1a7d2e7c03 size 847 MD5 9423b7a0f04e4e124835eacfe33c8d48 files/ethereal-0.10.14-asneeded.patch 847 RMD160 83896f31fb4b84940f17cb48a70073e849968543 files/ethereal-0.10.14-asneeded.patch 847 SHA256 2815e1f321400e74c01953a72b330e6080a5b65a5360d594ceeb8b1a7d2e7c03 files/ethereal-0.10.14-asneeded.patch 847 +AUX ethereal-0.10.14-capture_loop.patch 1985 RMD160 5d435678e4bf265899b9e95654c049ecc3d33435 SHA1 97d67db5d1e5cf2899addea552c093c4b5f7a5a2 SHA256 68b2a0997e2224fc0a26f7dcbc440e4b0b1574c845716072d554cdc422f55126 size 1985 MD5 99292dc5864a5d38a12bf357dab75e6f files/ethereal-0.10.14-capture_loop.patch 1985 RMD160 5d435678e4bf265899b9e95654c049ecc3d33435 files/ethereal-0.10.14-capture_loop.patch 1985 SHA256 68b2a0997e2224fc0a26f7dcbc440e4b0b1574c845716072d554cdc422f55126 files/ethereal-0.10.14-capture_loop.patch 1985 +DIST ethereal-0.10.14.tar.bz2 8583324 RMD160 1c11c43a1ceebb5a82dc920ca30b370ec73a1d23 SHA256 c8d0b59d599c5f7917666a0109a593be4ce031344de78228f92c481defc91258 size 8583324 +DIST ethereal-0.99.0.tar.bz2 8884587 RMD160 f86e21ae60d53e1ed60b61e58c2941ecfd4d8696 SHA256 b4bc14b6d385aa7d332d7e11e881d640676104d1f296dde7f50abac6ef794267 size 8884587 +EBUILD ethereal-0.10.14-r1.ebuild 3814 RMD160 d98d22045ff4b6bfe509923cf292df1a952d8eeb SHA1 4aba87aad7ebbddcdccb1807786b915ff1edaf2c SHA256 61feaf092e58a06c8699711a9662b3def73295e2e36c3225b86d9eda6769552a size 3814 +MD5 37e925f02777b6168f6aad1db53116ec ethereal-0.10.14-r1.ebuild 3814 +RMD160 d98d22045ff4b6bfe509923cf292df1a952d8eeb ethereal-0.10.14-r1.ebuild 3814 +SHA256 61feaf092e58a06c8699711a9662b3def73295e2e36c3225b86d9eda6769552a ethereal-0.10.14-r1.ebuild 3814 +EBUILD ethereal-0.10.14.ebuild 3576 RMD160 ecf41482a4ff4829e952e1c4ae60c2552e677254 SHA1 3c003378a0cbeb2f1b0b234780fd48e253024e93 SHA256 209920ddc054e769197ab637b4b2b163e1bed9dc1b206cfd12f786a07801e275 size 3576 +MD5 eeb4a9b83362b84c0348c0d07a199818 ethereal-0.10.14.ebuild 3576 +RMD160 ecf41482a4ff4829e952e1c4ae60c2552e677254 ethereal-0.10.14.ebuild 3576 +SHA256 209920ddc054e769197ab637b4b2b163e1bed9dc1b206cfd12f786a07801e275 ethereal-0.10.14.ebuild 3576 +EBUILD ethereal-0.99.0.ebuild 3968 RMD160 a466d19a10c5c7263f249b4f7c4b3896b263e021 SHA1 bdd8203ae14a9078bba847a9e5ad330f6708e284 SHA256 ec56dabf84728d4ff116346a4af8c9460820acdf4ab8a122ec653f8ede74f6a6 size 3968 +MD5 2deea9604fd864422b0ddbbf64022ec1 ethereal-0.99.0.ebuild 3968 +RMD160 a466d19a10c5c7263f249b4f7c4b3896b263e021 ethereal-0.99.0.ebuild 3968 +SHA256 ec56dabf84728d4ff116346a4af8c9460820acdf4ab8a122ec653f8ede74f6a6 ethereal-0.99.0.ebuild 3968 +MISC ChangeLog 16137 RMD160 e92c257ea46ea99776714f463f9acb292335402e SHA1 3449a52f9f112d1f1af0b49bb86d1cdb4ca94cc7 SHA256 52b90ddb1cb5bbf2d2b3b5ee3da7ddb55d58a35f2b86882197234cdb434b45b3 size 16137 +MD5 2011531a4b62d06a7c184cdfeccccd6b ChangeLog 16137 +RMD160 e92c257ea46ea99776714f463f9acb292335402e ChangeLog 16137 +SHA256 52b90ddb1cb5bbf2d2b3b5ee3da7ddb55d58a35f2b86882197234cdb434b45b3 ChangeLog 16137 +MISC metadata.xml 241 RMD160 e54fec44f06e7d8c93e399d9bd98e56f231920be SHA1 3f1b8ff204522d99acbe339fe83cbc916d460554 SHA256 684412188c16efe278e263e010f4bf09d33f17f2762d4829516e3e3a47ab3c02 size 241 MD5 94e03a4ff2917efc81b0e0f07040afde metadata.xml 241 RMD160 e54fec44f06e7d8c93e399d9bd98e56f231920be metadata.xml 241 SHA256 684412188c16efe278e263e010f4bf09d33f17f2762d4829516e3e3a47ab3c02 metadata.xml 241 +MD5 69227b87384c88f096f371b52f9dac4d files/digest-ethereal-0.10.14 256 +RMD160 6e3cd361f5ed6da23247588730796d99d13d53bb files/digest-ethereal-0.10.14 256 +SHA256 b87f7f32aa677e6b5a5a45cf6f61b9b4728b74d0f7908495fd55974e38d01b96 files/digest-ethereal-0.10.14 256 +MD5 69227b87384c88f096f371b52f9dac4d files/digest-ethereal-0.10.14-r1 256 +RMD160 6e3cd361f5ed6da23247588730796d99d13d53bb files/digest-ethereal-0.10.14-r1 256 +SHA256 b87f7f32aa677e6b5a5a45cf6f61b9b4728b74d0f7908495fd55974e38d01b96 files/digest-ethereal-0.10.14-r1 256 +MD5 c6839261e43bcc0927402c529a6e23cf files/digest-ethereal-0.99.0 253 +RMD160 24f9dbe348849fa1cd1b1c7cd98a04b846a214cf files/digest-ethereal-0.99.0 253 +SHA256 9a280483030d81621ca6b38e6d82686f8b926dc5861de6e143f8c034433ad81a files/digest-ethereal-0.99.0 253 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2.2 (GNU/Linux) +Version: GnuPG v1.4.3-ecc0.1.6 (GNU/Linux) -iD8DBQFEQSByAiZjviIA2XgRAuhkAJ48kmno/QiOZz1gjWf4AxQolcORcwCfcTSc -OyFGTUN4P/2gtBXHh1hrXlw= -=XP3h +iD8DBQFETiAZmdTrptrqvGERAsNAAJ4nR60vtuFLREphJ5rShYPYWhbotwCePpZv +7a+lBk6GDMi2GhwHUbFYXb4= +=wke0 -----END PGP SIGNATURE----- diff --git a/net-analyzer/ethereal/ethereal-0.10.13-r2.ebuild b/net-analyzer/ethereal/ethereal-0.10.13-r2.ebuild deleted file mode 100644 index ab2f0c06111f..000000000000 --- a/net-analyzer/ethereal/ethereal-0.10.13-r2.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ethereal/ethereal-0.10.13-r2.ebuild,v 1.9 2006/02/15 22:13:06 jokey Exp $ - -inherit libtool flag-o-matic eutils - -DESCRIPTION="A commercial-quality network protocol analyzer" -HOMEPAGE="http://www.ethereal.com/" -#SRC_URI="http://www.ethereal.com/distribution/${P}.tar.bz2" -SRC_URI="mirror://gentoo/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86" -IUSE="adns gtk ipv6 snmp ssl kerberos" - -RDEPEND=">=sys-libs/zlib-1.1.4 - snmp? ( >=net-analyzer/net-snmp-5.1.1 ) - >=dev-util/pkgconfig-0.15.0 - gtk? ( >=dev-libs/glib-2.0.4 - =x11-libs/gtk+-2* - x11-libs/pango - dev-libs/atk ) - !gtk? ( =dev-libs/glib-1.2* ) - ssl? ( >=dev-libs/openssl-0.9.6e ) - net-libs/libpcap - >=dev-libs/libpcre-4.2 - adns? ( net-libs/adns ) - kerberos? ( virtual/krb5 )" - -DEPEND="${RDEPEND} - dev-lang/perl - sys-devel/bison - sys-devel/flex - sys-apps/sed" - -pkg_setup() { - # bug 119208 - if built_with_use dev-lang/perl minimal ; then - ewarn "ethereal will not build if dev-lang/perl is compiled with" - ewarn "USE=minimal. Rebuild dev-lang/perl with USE=-minimal and try again." - ebeep 5 - die "dev-lang/perl compiled with USE=minimal" - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-fix-irc-loop-DoS-CVE-2005-3313.diff - epatch "${FILESDIR}"/${P}-packet-ospf.diff -} - -src_compile() { - - replace-flags -O? -O - - # Fix gcc-3.4 segfault #49238 - #[ "`gcc-version`" == "3.4" ] && append-flags -fno-unroll-loops - - local myconf - - if use gtk; then - einfo "Building with gtk support" - else - einfo "Building without gtk support" - myconf="${myconf} --disable-ethereal" - # the asn1 plugin needs gtk - sed -i -e '/plugins.asn1/d' Makefile.in || die "sed failed" - sed -i -e '/^SUBDIRS/s/asn1//' plugins/Makefile.in || die "sed failed" - fi - - econf \ - $(use_with ssl) \ - $(use_enable ipv6) \ - $(use_with adns) \ - $(use_with kerberos krb5) \ - $(use_with snmp net-snmp) \ - $(use_enable gtk gtk2) \ - --without-ucd-snmp \ - --enable-dftest \ - --enable-randpkt \ - --sysconfdir=/etc/ethereal \ - --enable-editcap \ - --enable-capinfos \ - --enable-text2pcap \ - --enable-dftest \ - --enable-randpkt \ - ${myconf} || die "bad ./configure" - - # fixes an access violation caused by libnetsnmp - see bug 79068 - use snmp && export MIBDIRS="${D}/usr/share/snmp/mibs" - - emake || die "compile problem" -} - -src_install() { - dodir /usr/lib/ethereal/plugins/${PV} - make DESTDIR="${D}" install || die - - dodoc AUTHORS ChangeLog NEWS README* - - insinto /usr/share/icons/hicolor/16x16/apps - newins "${S}"/image/hi16-app-ethereal.png ethereal.png - insinto /usr/share/icons/hicolor/32x32/apps - newins "${S}"/image/hi32-app-ethereal.png ethereal.png - insinto /usr/share/icons/hicolor/48x48/apps - newins "${S}"/image/hi48-app-ethereal.png ethereal.png - make_desktop_entry ethereal "Ethereal" ethereal -} - -pkg_postinst() { - ewarn "Due to a history of security flaws in this piece of software, it may contain more flaws." - ewarn "To protect yourself against malicious damage due to potential flaws in this product we recommend" - ewarn "you take the following security precautions when running ethereal in an untrusted environment:" - ewarn "do no run any longer than you need to;" - ewarn "use in a root jail - prefereably one that has been hardened with grsec like rootjail protections;" - ewarn "use a hardened operating system;" - ewarn "do not listen to addition interfaces;" - ewarn "if possible, run behind a firewall;" - ewarn "take a capture with tcpdump and analyze the contents offline running ethereal as a the least privileged user;" - ewarn "and subscribe to ethereal's announce list to be notified of newly discovered vulnerabilities." -} diff --git a/net-analyzer/ethereal/files/digest-ethereal-0.10.13-r2 b/net-analyzer/ethereal/files/digest-ethereal-0.10.13-r2 deleted file mode 100644 index 5048d2238514..000000000000 --- a/net-analyzer/ethereal/files/digest-ethereal-0.10.13-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 9998cb4907a70925d33292bae89530d4 ethereal-0.10.13.tar.gz 10213459 diff --git a/net-analyzer/ethereal/files/ethereal-0.10.13-fix-irc-loop-DoS-CVE-2005-3313.diff b/net-analyzer/ethereal/files/ethereal-0.10.13-fix-irc-loop-DoS-CVE-2005-3313.diff deleted file mode 100644 index fe5f879c82e8..000000000000 --- a/net-analyzer/ethereal/files/ethereal-0.10.13-fix-irc-loop-DoS-CVE-2005-3313.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- trunk/epan/dissectors/packet-irc.c 2005/09/23 21:33:02 15985 -+++ trunk/epan/dissectors/packet-irc.c 2005/10/24 02:35:43 16290 -@@ -86,6 +86,17 @@ - * Find the end of the line. - */ - linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE); -+ if (next_offset == offset) { -+ /* -+ * XXX - we really want the "show data a -+ * line at a time" loops in various -+ * dissectors to do reassembly and to -+ * throw an exception if there's no -+ * line ending in the current packet -+ * and we're not doing reassembly. -+ */ -+ break; -+ } - - if (linelen != 0) - { diff --git a/net-analyzer/ethereal/files/ethereal-0.10.13-packet-ospf.diff b/net-analyzer/ethereal/files/ethereal-0.10.13-packet-ospf.diff deleted file mode 100644 index 0e36a132eea5..000000000000 --- a/net-analyzer/ethereal/files/ethereal-0.10.13-packet-ospf.diff +++ /dev/null @@ -1,552 +0,0 @@ ---- ethereal-0.10.13.orig/epan/dissectors/packet-ospf.c 2005-12-10 12:40:02.000000000 -0200 -+++ ethereal-0.10.13/epan/dissectors/packet-ospf.c 2005-12-11 20:13:21.000000000 -0200 -@@ -199,6 +199,25 @@ - - - static int proto_ospf = -1; -+static int hf_ospf_options_v2 = -1; -+static int hf_ospf_options_v2_e = -1; -+static int hf_ospf_options_v2_mc = -1; -+static int hf_ospf_options_v2_np = -1; -+static int hf_ospf_options_v2_ea = -1; -+static int hf_ospf_options_v2_dc = -1; -+static int hf_ospf_options_v2_o = -1; -+static int hf_ospf_options_v2_dn = -1; -+static int hf_ospf_options_v3 = -1; -+static int hf_ospf_options_v3_v6 = -1; -+static int hf_ospf_options_v3_e = -1; -+static int hf_ospf_options_v3_mc = -1; -+static int hf_ospf_options_v3_n = -1; -+static int hf_ospf_options_v3_r = -1; -+static int hf_ospf_options_v3_dc = -1; -+static int hf_ospf_dbd = -1; -+static int hf_ospf_dbd_i = -1; -+static int hf_ospf_dbd_m = -1; -+static int hf_ospf_dbd_ms = -1; - - static gint ett_ospf = -1; - static gint ett_ospf_hdr = -1; -@@ -208,6 +227,9 @@ - static gint ett_ospf_lsa = -1; - static gint ett_ospf_lsa_router_link = -1; - static gint ett_ospf_lsa_upd = -1; -+static gint ett_ospf_options_v2 = -1; -+static gint ett_ospf_options_v3 = -1; -+static gint ett_ospf_dbd = -1; - - /* Trees for opaque LSAs */ - static gint ett_ospf_lsa_mpls = -1; -@@ -218,6 +240,74 @@ - static gint ett_ospf_lsa_oif_tna = -1; - static gint ett_ospf_lsa_oif_tna_stlv = -1; - -+ -+ -+static const true_false_string tfs_options_v2_dc = { -+ "Demand Circuits are supported", -+ "Demand circuits are NOT supported" -+}; -+static const true_false_string tfs_options_v2_ea = { -+ "External Attributes are supported", -+ "External attributes are NOT supported" -+}; -+static const true_false_string tfs_options_v2_np = { -+ "NSSA is supported", -+ "Nssa is NOT supported" -+}; -+static const true_false_string tfs_options_v2_mc = { -+ "Multicast Capable", -+ "NOT multicast capable" -+}; -+static const true_false_string tfs_options_v2_e = { -+ "ExternalRoputingCapability", -+ "NO ExternalRoutingCapability" -+}; -+static const true_false_string tfs_options_v2_o = { -+ "O-bit is SET", -+ "O-bit is CLEAR" -+}; -+static const true_false_string tfs_options_v2_dn = { -+ "DN-bit is SET", -+ "DN-bit is CLEAR" -+}; -+ -+static const true_false_string tfs_options_v3_v6 = { -+ "V6 is SET", -+ "V6 is NOT set" -+}; -+static const true_false_string tfs_options_v3_e = { -+ "E is SET", -+ "E is NOT set" -+}; -+static const true_false_string tfs_options_v3_mc = { -+ "MC is SET", -+ "MC is NOT set" -+}; -+static const true_false_string tfs_options_v3_n = { -+ "N is SET", -+ "N is NOT set" -+}; -+static const true_false_string tfs_options_v3_r = { -+ "R is SET", -+ "R is NOT set" -+}; -+static const true_false_string tfs_options_v3_dc = { -+ "DC is SET", -+ "DC is NOT set" -+}; -+static const true_false_string tfs_dbd_i = { -+ "I is SET", -+ "I is NOT set" -+}; -+static const true_false_string tfs_dbd_m = { -+ "M is SET", -+ "M is NOT set" -+}; -+static const true_false_string tfs_dbd_ms = { -+ "MS is SET", -+ "MS is NOT set" -+}; -+ - /*----------------------------------------------------------------------- - * OSPF Filtering - *-----------------------------------------------------------------------*/ -@@ -373,7 +463,63 @@ - {&ospf_filter[OSPFF_LS_MPLS_LINKCOLOR], - { "MPLS/TE Link Resource Class/Color", "ospf.mpls.linkcolor", FT_UINT32, - BASE_HEX, NULL, 0x0, "MPLS/TE Link Resource Class/Color", HFILL }}, -- -+ {&hf_ospf_options_v2, -+ { "Options", "ospf.options.v2", FT_UINT8, BASE_HEX, -+ NULL, 0x0, "", HFILL }}, -+ {&hf_ospf_options_v2_e, -+ { "E", "ospf.options.v2.e", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_e), OSPF_V2_OPTIONS_E, "", HFILL }}, -+ {&hf_ospf_options_v2_mc, -+ { "MC", "ospf.options.v2.mc", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_mc), OSPF_V2_OPTIONS_MC, "", HFILL }}, -+ {&hf_ospf_options_v2_np, -+ { "NP", "ospf.options.v2.np", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_np), OSPF_V2_OPTIONS_NP, "", HFILL }}, -+ {&hf_ospf_options_v2_ea, -+ { "EA", "ospf.options.v2.ea", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_ea), OSPF_V2_OPTIONS_EA, "", HFILL }}, -+ {&hf_ospf_options_v2_dc, -+ { "DC", "ospf.options.v2.dc", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_dc), OSPF_V2_OPTIONS_DC, "", HFILL }}, -+ {&hf_ospf_options_v2_o, -+ { "O", "ospf.options.v2.o", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_o), OSPF_V2_OPTIONS_O, "", HFILL }}, -+ {&hf_ospf_options_v2_dn, -+ { "DN", "ospf.options.v2.dn", FT_BOOLEAN, 8, -+ TFS(&tfs_options_v2_dn), OSPF_V2_OPTIONS_DN, "", HFILL }}, -+ {&hf_ospf_options_v3, -+ { "Options", "ospf.options.v3", FT_UINT24, BASE_HEX, -+ NULL, 0x0, "", HFILL }}, -+ {&hf_ospf_options_v3_v6, -+ { "V6", "ospf.options.v3.v6", FT_BOOLEAN, 24, -+ TFS(&tfs_options_v3_v6), OSPF_V3_OPTIONS_V6, "", HFILL }}, -+ {&hf_ospf_options_v3_e, -+ { "E", "ospf.options.v3.e", FT_BOOLEAN, 24, -+ TFS(&tfs_options_v3_e), OSPF_V3_OPTIONS_E, "", HFILL }}, -+ {&hf_ospf_options_v3_mc, -+ { "MC", "ospf.options.v3.mc", FT_BOOLEAN, 24, -+ TFS(&tfs_options_v3_mc), OSPF_V3_OPTIONS_MC, "", HFILL }}, -+ {&hf_ospf_options_v3_n, -+ { "N", "ospf.options.v3.n", FT_BOOLEAN, 24, -+ TFS(&tfs_options_v3_n), OSPF_V3_OPTIONS_N, "", HFILL }}, -+ {&hf_ospf_options_v3_r, -+ { "R", "ospf.options.v3.r", FT_BOOLEAN, 24, -+ TFS(&tfs_options_v3_r), OSPF_V3_OPTIONS_R, "", HFILL }}, -+ {&hf_ospf_options_v3_dc, -+ { "DC", "ospf.options.v3.dc", FT_BOOLEAN, 24, -+ TFS(&tfs_options_v3_dc), OSPF_V3_OPTIONS_DC, "", HFILL }}, -+ {&hf_ospf_dbd, -+ { "DB Description", "ospf.dbd", FT_UINT8, BASE_HEX, -+ NULL, 0x0, "", HFILL }}, -+ {&hf_ospf_dbd_i, -+ { "I", "ospf.dbd.i", FT_BOOLEAN, 8, -+ TFS(&tfs_dbd_i), OSPF_DBD_FLAG_I, "", HFILL }}, -+ {&hf_ospf_dbd_m, -+ { "M", "ospf.dbd.m", FT_BOOLEAN, 8, -+ TFS(&tfs_dbd_m), OSPF_DBD_FLAG_M, "", HFILL }}, -+ {&hf_ospf_dbd_ms, -+ { "MS", "ospf.dbd.ms", FT_BOOLEAN, 8, -+ TFS(&tfs_dbd_ms), OSPF_DBD_FLAG_MS, "", HFILL }}, - - - }; -@@ -742,13 +888,45 @@ - } - - static void -+dissect_ospf_dbd (proto_tree *parent_tree, tvbuff_t *tvb, int offset) -+{ -+ proto_item *item=NULL; -+ proto_tree *tree=NULL; -+ guint8 flags; -+ -+ flags = tvb_get_guint8 (tvb, offset); -+ if(parent_tree){ -+ item=proto_tree_add_uint(parent_tree, hf_ospf_dbd, -+ tvb, offset, 1, flags); -+ tree=proto_item_add_subtree(item, ett_ospf_dbd); -+ } -+ -+ proto_tree_add_boolean(tree, hf_ospf_dbd_i, tvb, offset, 1, flags); -+ if (flags&OSPF_DBD_FLAG_I){ -+ proto_item_append_text(item, " I"); -+ } -+ flags&=(~( OSPF_DBD_FLAG_I )); -+ -+ proto_tree_add_boolean(tree, hf_ospf_dbd_m, tvb, offset, 1, flags); -+ if (flags&OSPF_DBD_FLAG_M){ -+ proto_item_append_text(item, " M"); -+ } -+ flags&=(~( OSPF_DBD_FLAG_M )); -+ -+ proto_tree_add_boolean(tree, hf_ospf_dbd_ms, tvb, offset, 1, flags); -+ if (flags&OSPF_DBD_FLAG_MS){ -+ proto_item_append_text(item, " MS"); -+ } -+ flags&=(~( OSPF_DBD_FLAG_MS )); -+} -+ -+ -+static void - dissect_ospf_db_desc(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version) - { - proto_tree *ospf_db_desc_tree=NULL; - proto_item *ti; -- guint8 flags; - guint8 reserved; -- char flags_string[20] = ""; - - if (tree) { - ti = proto_tree_add_text(tree, tvb, offset, -1, "OSPF DB Description"); -@@ -757,27 +935,13 @@ - switch (version ) { - - case OSPF_VERSION_2: -- - proto_tree_add_text(ospf_db_desc_tree, tvb, offset, 2, "Interface MTU: %u", - tvb_get_ntohs(tvb, offset)); - - dissect_ospf_options(tvb, offset + 2, ospf_db_desc_tree, version); - -- flags = tvb_get_guint8(tvb, offset + 3); -- if (flags & OSPF_DBD_FLAG_MS) -- strcat(flags_string, "MS"); -- if (flags & OSPF_DBD_FLAG_M) { -- if (flags_string[0] != '\0') -- strcat(flags_string, "/"); -- strcat(flags_string, "M"); -- } -- if (flags & OSPF_DBD_FLAG_I) { -- if (flags_string[0] != '\0') -- strcat(flags_string, "/"); -- strcat(flags_string, "I"); -- } -- proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 3, 1, "Flags: 0x%x (%s)", -- flags, flags_string); -+ dissect_ospf_dbd(ospf_db_desc_tree, tvb, offset+3); -+ - proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 4, 4, "DD Sequence: %u", - tvb_get_ntohl(tvb, offset + 4)); - -@@ -799,21 +963,7 @@ - proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 6, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"), - reserved); - -- flags = tvb_get_guint8(tvb, offset + 7); -- if (flags & OSPF_DBD_FLAG_MS) -- strcat(flags_string, "MS"); -- if (flags & OSPF_DBD_FLAG_M) { -- if (flags_string[0] != '\0') -- strcat(flags_string, "/"); -- strcat(flags_string, "M"); -- } -- if (flags & OSPF_DBD_FLAG_I) { -- if (flags_string[0] != '\0') -- strcat(flags_string, "/"); -- strcat(flags_string, "I"); -- } -- proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 7, 1, "Flags: 0x%x (%s)", -- flags, flags_string); -+ dissect_ospf_dbd(ospf_db_desc_tree, tvb, offset+7); - - proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 8, 4, "DD Sequence: %u", - tvb_get_ntohl(tvb, offset + 8)); -@@ -2165,103 +2315,128 @@ - - - static void --dissect_ospf_options(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version) -+dissect_ospf_v2_options (proto_tree *parent_tree, tvbuff_t *tvb, int offset) - { -- guint8 options_ospfv2; -- guint32 options_ospfv3; -- char options_string[20] = ""; -- -- /* ATTENTION !!! no check for length of options string - with OSPFv3 maximum length is 14 characters */ -+ proto_item *item=NULL; -+ proto_tree *tree=NULL; -+ guint8 flags; -+ -+ flags = tvb_get_guint8 (tvb, offset); -+ if(parent_tree){ -+ item=proto_tree_add_uint(parent_tree, hf_ospf_options_v2, -+ tvb, offset, 1, flags); -+ tree=proto_item_add_subtree(item, ett_ospf_options_v2); -+ } - -- switch ( version ) { -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_o, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_O){ -+ proto_item_append_text(item, " O"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_O )); - -- case OSPF_VERSION_2: - -- options_ospfv2 = tvb_get_guint8(tvb, offset); -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_dc, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_DC){ -+ proto_item_append_text(item, " DC"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_DC )); - -- if (options_ospfv2 & OSPF_V2_OPTIONS_E) -- strcat(options_string, "E"); -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_ea, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_EA){ -+ proto_item_append_text(item, " EA"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_EA )); - -- if (options_ospfv2 & OSPF_V2_OPTIONS_MC) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "MC"); -- } -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_np, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_NP){ -+ proto_item_append_text(item, " NP"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_NP )); - -- if (options_ospfv2 & OSPF_V2_OPTIONS_NP) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "NP"); -- } -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_mc, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_MC){ -+ proto_item_append_text(item, " MC"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_MC )); - -- if (options_ospfv2 & OSPF_V2_OPTIONS_EA) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "EA"); -- } -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_e, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_E){ -+ proto_item_append_text(item, " E"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_E )); - -- if (options_ospfv2 & OSPF_V2_OPTIONS_DC) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "DC"); -- } -+ proto_tree_add_boolean(tree, hf_ospf_options_v2_dn, tvb, offset, 1, flags); -+ if (flags&OSPF_V2_OPTIONS_DN){ -+ proto_item_append_text(item, " DN"); -+ } -+ flags&=(~( OSPF_V2_OPTIONS_DN )); -+} - -- if (options_ospfv2 & OSPF_V2_OPTIONS_O) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "O"); -- } -+static void -+dissect_ospf_v3_options (proto_tree *parent_tree, tvbuff_t *tvb, int offset) -+{ -+ proto_item *item=NULL; -+ proto_tree *tree=NULL; -+ guint32 flags; -+ -+ flags = tvb_get_ntoh24 (tvb, offset); -+ if(parent_tree){ -+ item=proto_tree_add_uint(parent_tree, hf_ospf_options_v3, -+ tvb, offset, 3, flags); -+ tree=proto_item_add_subtree(item, ett_ospf_options_v3); -+ } - -- if (options_ospfv2 & OSPF_V2_OPTIONS_DN) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "DN"); -- } -+ proto_tree_add_boolean(tree, hf_ospf_options_v3_dc, tvb, offset, 3, flags); -+ if (flags&OSPF_V3_OPTIONS_DC){ -+ proto_item_append_text(item, " DC"); -+ } -+ flags&=(~( OSPF_V3_OPTIONS_DC )); - -- proto_tree_add_text(tree, tvb, offset, 1, "Options: 0x%x (%s)", -- options_ospfv2, options_string); -- break; -+ proto_tree_add_boolean(tree, hf_ospf_options_v3_r, tvb, offset, 3, flags); -+ if (flags&OSPF_V3_OPTIONS_R){ -+ proto_item_append_text(item, " R"); -+ } -+ flags&=(~( OSPF_V3_OPTIONS_R )); - -+ proto_tree_add_boolean(tree, hf_ospf_options_v3_n, tvb, offset, 3, flags); -+ if (flags&OSPF_V3_OPTIONS_N){ -+ proto_item_append_text(item, " N"); -+ } -+ flags&=(~( OSPF_V3_OPTIONS_N )); - -- case OSPF_VERSION_3: -+ proto_tree_add_boolean(tree, hf_ospf_options_v3_mc, tvb, offset, 3, flags); -+ if (flags&OSPF_V3_OPTIONS_MC){ -+ proto_item_append_text(item, " MC"); -+ } -+ flags&=(~( OSPF_V3_OPTIONS_MC )); - -- options_ospfv3 = tvb_get_ntoh24(tvb, offset); -+ proto_tree_add_boolean(tree, hf_ospf_options_v3_e, tvb, offset, 3, flags); -+ if (flags&OSPF_V3_OPTIONS_E){ -+ proto_item_append_text(item, " E"); -+ } -+ flags&=(~( OSPF_V3_OPTIONS_E )); - -- if (options_ospfv3 & OSPF_V3_OPTIONS_V6) -- strcat(options_string, "V6"); -+ proto_tree_add_boolean(tree, hf_ospf_options_v3_v6, tvb, offset, 3, flags); -+ if (flags&OSPF_V3_OPTIONS_V6){ -+ proto_item_append_text(item, " V6"); -+ } -+ flags&=(~( OSPF_V3_OPTIONS_V6 )); - -- if (options_ospfv3 & OSPF_V3_OPTIONS_E) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "E"); -- } -+} - -- if (options_ospfv3 & OSPF_V3_OPTIONS_MC) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "MC"); -- } - -- if (options_ospfv3 & OSPF_V3_OPTIONS_N) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "N"); -- } -+static void -+dissect_ospf_options(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version) -+{ -+ switch ( version ) { - -- if (options_ospfv3 & OSPF_V3_OPTIONS_R) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "R"); -- } -+ case OSPF_VERSION_2: -+ dissect_ospf_v2_options (tree, tvb, offset); -+ break; - -- if (options_ospfv3 & OSPF_V3_OPTIONS_DC) { -- if (options_string[0] != '\0') -- strcat(options_string, "/"); -- strcat(options_string, "DC"); -- } - -- proto_tree_add_text(tree, tvb, offset, 3, "Options: 0x%x (%s)", -- options_ospfv3, options_string); -+ case OSPF_VERSION_3: -+ dissect_ospf_v3_options (tree, tvb, offset); - break; - } - -@@ -2321,39 +2496,28 @@ - static void dissect_ospf_v3_address_prefix(tvbuff_t *tvb, int offset, int prefix_length, proto_tree *tree) - { - -- guint8 value; -- guint8 position; -- guint8 bufpos; -- gchar *buffer; -- gchar *bytebuf; -- guint8 bytes_to_process; -- int start_offset; -+ int bytes_to_process; -+ struct e_in6_addr prefix; - -- start_offset=offset; -- position=0; -- bufpos=0; - bytes_to_process=((prefix_length+31)/32)*4; - -- buffer=ep_alloc(32+7); -- while (bytes_to_process > 0 ) { -- -- value=tvb_get_guint8(tvb, offset); -- -- if ( (position > 0) && ( (position%2) == 0 ) ) -- buffer[bufpos++]=':'; -- -- bytebuf=ep_alloc(3); -- g_snprintf(bytebuf, 3, "%02x",value); -- buffer[bufpos++]=bytebuf[0]; -- buffer[bufpos++]=bytebuf[1]; -- -- position++; -- offset++; -- bytes_to_process--; -+ if (prefix_length > 128) { -+ proto_tree_add_text(tree, tvb, offset, bytes_to_process, -+ "Address Prefix: length is invalid (%d, should be <= 128)", -+ prefix_length); -+ return; - } - -- buffer[bufpos]=0; -- proto_tree_add_text(tree, tvb, start_offset, ((prefix_length+31)/32)*4, "Address Prefix: %s",buffer); -+ memset(prefix.bytes, 0, sizeof prefix.bytes); -+ if (bytes_to_process != 0) { -+ tvb_memcpy(tvb, prefix.bytes, offset, bytes_to_process); -+ if (prefix_length % 8) { -+ prefix.bytes[bytes_to_process - 1] &= -+ ((0xff00 >> (prefix_length % 8)) & 0xff); -+ } -+ } -+ proto_tree_add_text(tree, tvb, offset, bytes_to_process, -+ "Address Prefix: %s", ip6_to_str(&prefix)); - - } - -@@ -2376,7 +2540,10 @@ - &ett_ospf_lsa_mpls_link_stlv, - &ett_ospf_lsa_mpls_link_stlv_admingrp, - &ett_ospf_lsa_oif_tna, -- &ett_ospf_lsa_oif_tna_stlv -+ &ett_ospf_lsa_oif_tna_stlv, -+ &ett_ospf_options_v2, -+ &ett_ospf_options_v3, -+ &ett_ospf_dbd - }; - - proto_ospf = proto_register_protocol("Open Shortest Path First", |