Commit Graph

319 Commits

Author SHA1 Message Date
Evan Huus 0eda51a646 to_str: scope tvb_ip6_to_str 2021-10-07 13:31:23 -04:00
Evan Huus 07f5472aa7 to_str: scope tvb_ip_to_str 2021-10-07 10:25:12 -04:00
Evan Huus e578c6caee to_str: pull scope arg up into tvb_ether_to_str
There are a bunch of near-identical macros here, but I'm gonna change
one at a time or else the builder times out at the number of files
changed in one merge.
2021-10-04 17:10:17 +00:00
Taisuke Sasaki b9687f7d85 BGP: Add BGP-LS BGP Egress Peer Engineering (rfc9086) 2021-09-21 13:32:20 +00:00
Martin Mathieson dd667dddf0 Some spelling fixes 2021-09-18 20:52:04 +00:00
Taisuke Sasaki 806599b923 BGP: Add BGP-LS Flex Algorithm (draft-ietf-idr-bgp-ls-flex-algo-07) 2021-09-15 05:42:44 +00:00
Uli Heilmeier 2d08611d54 BGP: Add RFC 9104 Extended Administrative Groups
Added support for RFC 9104 "Distribution of Traffic Engineering
Extended Administrative Groups Using the Border Gateway Protocol
- Link State (BGP-LS)"
2021-09-13 04:30:36 +00:00
Taisuke Sasaki 42372c0dfa BGP: Add BGP-LS SR Local Block TLV (rfc9085)
- Add BGP-LS Prefix Attribute Flags TLV (rfc9085)
- Add BGP-LS Node/Link MSD (rfc8814)
- Add BGP-LS Link Local/Remote Identifiers TLV (rfc5307)
- Modified from error to warning for unsupported BGP-LS Attribute TLVs
2021-09-09 06:22:09 +00:00
Taisuke Sasaki b4ef378e5e BGP: Fix BGP-LS TLV offset of IGP TE Metric (RFC8571) 2021-09-03 05:51:39 +00:00
Martin Mathieson d34d1a1e13 More fussing with masks.
Mostly longer masks with odd numbers of digits.
2021-07-29 10:15:58 +00:00
David Perry 6e8c7283d6 Change some `wmem_packet_scope()` to `pinfo->pool` 2021-07-27 21:36:43 +00:00
John Thacker a682f45c23 BGP: Update and fix handling of Multiprotocol Extensions
In the MP_REACH_NLRI attribute, break out the Next Hop field into
constituent subfields for different address types. Add a field name
for the NLRI to make it filterable and consistent with the standard
NLRI attribute. Also add a field name for the withdrawn routes for
the MP_UNREACH_NLRI attribute.

Correct a comment about RFC 2545 and the handling of what it allows,
viz. IPv6 next hop addresses being optionally followed by link-local
next hop addresses.

The above has nothing to do with RFC 2283 allowing multiple <afi, safi,
..., NLRI> tuples (which was impossible to implement, and RFC 2858
later explicitly disallowed), so correct the comment about that.
2021-05-01 09:07:21 -04:00
John Thacker 9569288c3b BGP: Update Subsequent Address Family Identifiers (SAFI)
Update SAFI defines and value string from last update at
https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml
2021-04-24 08:28:10 +00:00
Uli Heilmeier 94628dc8fb BGP: Add support for draft-filsfils-spring-net-pgm-extension-srv6-usid
Adding additional endpoint behavior as defined in
https://tools.ietf.org/html/draft-filsfils-spring-net-pgm-extension-srv6-usid-10#section-10

Fixes: wireshark/wireshark#17343
2021-04-17 05:20:14 +00:00
Yuya Kawakami 861054fb83 epan: fix proto register bgp to make mp_[un]reach_nlri.safi available 2021-04-09 13:04:50 +00:00
Martin Mathieson 678914ca0b Fix some item lengths.
As seen by tools/check_type_item_lengths.py
2021-03-29 05:30:27 +00:00
Martin Mathieson 2753c4c27e Expert info: check group and severity
Add a check for valid group and severity values, and fix violations foud.
2021-03-09 19:14:29 +00:00
Martin Mathieson cd77e5aa5f Some more spelling fixes.
Also add more words to dictionary file.
2021-02-21 09:59:04 +00:00
Uli Heilmeier f6af99045f BGP: Support for RFC9003
RFC9003 obsoletes RFC8203 and updates max length for Shutdown
Communication field from 128 to 255 bytes.
2021-01-10 19:43:44 +00:00
Uli Heilmeier f652c79d5e BGP: Require min length Add-Path-Prefix check
detect_add_path_prefix46() is too greedy when there is a normal NLRI
(non Add-Path) with multiple <length, prefix> tuples containing a zero
length prefix at the start or in the middle.

According to [1] we don't know the amount of tuples, only the overall
length. As the Open message may be missing we still need the heuristic
to detect Add-Path prefix usage.

[1] https://tools.ietf.org/html/rfc4271#section-4.3

Related to wireshark/wireshark#16820
2020-12-31 10:10:53 +00:00
Alexis La Goutte 692ab543e6 BGP: fix item length
reported by check_typed_proto_items.py
packet-bgp.c:8440 proto_tree_add_item called for hf_bgp_update_encaps_tunnel_subtlv_lb_block_length  -  item type is FT_UINT16 but call has len  4
packet-bgp.c:9152 proto_tree_add_item called for hf_bgp_route_refresh_orf_entry_sequence  -  item type is FT_UINT8 but call has len  4
2020-11-15 10:02:43 +00:00
Martin Mathieson 580de09849 Fix a few spelling mistakes. 2020-11-12 09:52:52 +00:00
Hideaki HAYASHI 986a4712ba epan: BGP Prefix-SID attribute SRv6 SID support
[Update] BGP Prefix-SID definition (from draft-ietf-idr-bgp-prefix-sid-05 to RFC8669).
[Support] BGP Prefix-SID SRv6 SID (draft-ietf-bess-srv6-services-05)
2020-11-11 13:26:18 +00:00
Pascal Quantin 1afe9a96d4 BGP: remove useless assignments
Closes #16896
2020-10-07 10:42:14 +00:00
Martin Mathieson 08ab0e5d1f Fix some wrong filter names.
These were detected by running check_typed_item_calls.py
with --consecutive, which flags items that have different
labels but the same filter string.  Usually this is because
of copy/paste.

Quite a few similar bugs still exist, will address in a future commit.
2020-09-27 18:40:13 +00:00
Martin Mathieson fc64ba242a More dissector spelling fixes. 2020-09-24 16:40:51 +00:00
Alexis La Goutte 563a270019 BMP: Add Route Policy (draft-xu-grow-bmp-route-policy-attr-trace-04)
new BMP Message type (Section 2.1).
  o  Type = TBD: Route Policy and Attribute Trace Message. (100)

new TLV types for the Route  Policy and Attribute Trace Message (Section 2.3).
   o  Type = TBD1 (2 Byte): VRF/Table TLV. (0)
   o  Type = TBD2 (2 Byte): Policy TLV. (1)
   o  Type = TBD3 (2 Byte): Pre Policy Attribute TLV. (2)
   o  Type = TBD4 (2 Byte): Post Policy Attribute TLV. (3)
   o  Type = TBD5 (2 Byte): String TLV. (4)

Bug: 16749
Change-Id: I9858c94fb8fe5a9f3341204646030e59e13509bf
Reviewed-on: https://code.wireshark.org/review/37911
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Uli Heilmeier <openid@heilmeier.eu>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-14 04:34:31 +00:00
Uli Heilmeier 3526ecd623 BGP: Fix scope for path attribute packet_data
We need wmem_file_scope() to handle path attribute info after
MPLS/VNI label.

Bug: 16678
Change-Id: Ib487b271110c78d2d4ae10f01fc24cda3edc0713
Reviewed-on: https://code.wireshark.org/review/37790
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-09 07:24:13 +00:00
Uli Heilmeier 006a7f5115 BGP: Use VNI when VXLAN/VXLAN-GPE encapsulation is specified
RFC8365 and draft-ietf-idr-tunnel-encaps-15 defines to use the
MPLS Label field to carry the VNI in the presence of a Tunnel
Encapsulation Extended Community specifying the use of a VNI.

This is the case for VXLAN and VXLAN-GPE tunnel types.

Bug: 16643
Change-Id: I4ffc8b024c2102b7fab4d7cb3dd1a5d69c569c12
Reviewed-on: https://code.wireshark.org/review/37551
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-24 10:46:39 +00:00
Jaap Keuter cac1426dd6 BGP: MP_REACH_NLRI dissect Next hop network address for EVPN
Add EVPN to the set of SAFI's of the L2VPN AFI to dissect the
Net hop network address for.

Bug: 16644
Change-Id: Ib335e765907d72945a5e58e6e992f84b92f9f261
Reviewed-on: https://code.wireshark.org/review/37536
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-22 15:43:53 +00:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Jaap Keuter 9750d00ff1 Introduce tfs_get_string helper
true_false_strings have no helper function to properly retrieve the
string representing the true or false value, much like unit_strings,
even though this is not uncommon in dissectors.
This change introduces the helper function and modifies the dissectors,
so that they use this helper i.s.o. their own expressions.

Change-Id: I477ed2d90a9a529fc5dcfef7e3ea42ec180d27ae
Reviewed-on: https://code.wireshark.org/review/36920
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-25 04:39:46 +00:00
Dario Lombardo d3c4dfa9ee wsutil: use ws_in4_addr in tvb_get_ipv4_addr_with_prefix_len.
Instead of guint8* the used type looks more precise. Moreover there
is no need to use local unions in the dissectors to switch between
the actual address and address bytes.

bgp, eigrp and isis-lsp dissectors have been updated accordingly.

Change-Id: I7785fe4c12913a09bd31cd6ef26e53027646d35c
Reviewed-on: https://code.wireshark.org/review/36836
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-14 08:31:11 +00:00
Martin Mathieson d70a4a9321 Standardise IETF RFC and Draft URLs in dissectors.
Prefer:
- html (rather than txt)
- https

Also includes the script check_dissector_urls.py,
that can be used to find links in code and test them.

Change-Id: Iafd8bb8948674a38ad5232bf5b5432ffb2b1251b
Reviewed-on: https://code.wireshark.org/review/36821
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-04-13 14:58:48 +00:00
Uli Heilmeier bb352dc0db BGP: Update/Fix Extended Communities
Changed and updated BGP extended communities according to:

* https://www.iana.org/assignments/bgp-extended-communities/bgp-extended-communities.xhtml
* RFC 7674
* RFC 8317
* RFC 7796
* draft-ietf-bess-evpn-inter-subnet-forwarding-08

Bug: 16449
Change-Id: Idaf1026ac4e3162ba54c163782261379931803e0
Reviewed-on: https://code.wireshark.org/review/36803
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-04-12 19:02:47 +00:00
Uli Heilmeier 1fa51cfc0c BGP: MPLS label for EVPN Extented community
Dissect MPLS label fields for EVPN Extented Community.
RFC7432 section-8.2.1 defines only a SHOULD for ESI label set to a MPLS
label when Single-Active redundancy mode is desired.
Therefore and not break current implemntation we only add the additional
dissection of the MPLS label bits.

Bug: 16313
Change-Id: Iad2561b90aeace212f79a874efb59af917aca3f1
Reviewed-on: https://code.wireshark.org/review/35692
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-10 06:29:28 +00:00
Jaap Keuter 10ef28df30 BGP: Add EVPN Layer 2 Attributes Extended Community (RFC 8214)
Bug: 16287
Change-Id: Ic76972c2c99d0206c68703bee924c0e16ffdeae7
Reviewed-on: https://code.wireshark.org/review/35702
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-09 07:14:46 +00:00
Uli Heilmeier 984c7a9c42 BGP: update Well-known Communities
Update the well-known communities as defined by
https://www.iana.org/assignments/bgp-well-known-communities/bgp-well-known-communities.xhtml

Communities for expired drafts has been ignored.

Change-Id: I3dedea2bdaad8feda3c7f1d9886092d4c02d6f95
Reviewed-on: https://code.wireshark.org/review/35602
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 13:07:51 +00:00
Uli Heilmeier 4f105e1f24 BGP: Support for drafts Tunnel Encapsulation and Segment Routing
Add support for BGP Tunnel Encapsulation Attribute
(draft-ietf-idr-tunnel-encaps-15) and Advertising Segment
Routing Policies in BGP (draft-ietf-idr-segment-routing-te-policy-08).

Due to missing pcap file(s) most of the Segment List Sub-TLVs
are still missing.

Bug: 16294
Change-Id: I0d7524934d5c5f2458a3f9a68e1e49c95a030c32
Reviewed-on: https://code.wireshark.org/review/35587
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-02 05:53:13 +00:00
Michael Pergament 4370164419 BGP: Add D-PATH Attribute
Add D-PATH Attribute as described in
draft-rabadan-sajassi-bess-evpn-ipvpn-interworking

Bug: 16238
Change-Id: If40699304fca1409a195b83075dd40c6769c2df4
Reviewed-on: https://code.wireshark.org/review/35223
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-11-28 13:34:45 +00:00
mpergament1975 1178c59c05 BGP EVPN: Adding Type 10 route support
(draft-ietf-bess-evpn-bum-procedure-updates-07)

Change-Id: I8187da5bb9f8fa84a4c5835ff5c61a6669d4fb32
Reviewed-on: https://code.wireshark.org/review/34998
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-06 13:26:11 +00:00
Uli Heilmeier 7dfe906176 BGP: IPv6 Linkstate Prefix Reachability info
Add IP version to call the right decode_prefix function.

Bug: 16144
Change-Id: I06239863b98beeef9ff80e1a8b6e13b4113fb065
Reviewed-on: https://code.wireshark.org/review/34913
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-03 13:16:05 +00:00
Colin Sames 5db3ef90de BGP: Add dissector for BGPsec Updates.
RFC8205 specifies the BGPsec extension. The extended Wireshark dissector
consists of:

- BGPsec Capability
    a capability that holds the BGPsec version, a direction and reserved
    bits.
- BGPsec_PATH
    a BGP path attribute. Such a path contains Secure Path Segments and
    Signature Segments.

Change-Id: Iba5e17b9139bcac378adf2bcc2dfb369064f7a08
Reviewed-on: https://code.wireshark.org/review/34639
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-28 18:54:53 +00:00
João Valverde 343adfc60e BGP: Fix indentation
Change-Id: I0957a8ce104c5ff81680e722c564337eff052c2f
Reviewed-on: https://code.wireshark.org/review/34642
Reviewed-by: João Valverde <j@v6e.pt>
2019-09-28 12:54:58 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Uli Heilmeier fb0cb6373c BGP: Update description for IE Flag (EVPN IGMP)
Ping-Bug: 15911
Change-Id: I2607eb96e8a217451a493a301dc06b56a4db3081
Reviewed-on: https://code.wireshark.org/review/33966
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-07-17 07:07:49 +00:00
Uli Heilmeier 79484e84fd BGP: Adding draft-ietf-bess-evpn-igmp-mld-proxy
Adding support for draft-ietf-bess-evpn-igmp-mld-proxy-03

Bug: 15911
Change-Id: I42c0cf4551a7669742457691cc820a4057faf697
Reviewed-on: https://code.wireshark.org/review/33951
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-16 06:41:55 +00:00
Alexis La Goutte ad72d54855 BGP: Update Tunnel Encapsulation Attribute Types (and SubType)
From IANA https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml

Ping-Bug: 15746
Change-Id: I1f0fc25cd814453546a635e063cf2807cfc6c89a
Reviewed-on: https://code.wireshark.org/review/33059
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2019-05-06 16:08:24 +00:00
Alexis La Goutte d6ab4f792b BGP: Add missing SAFI Segment Routing Policy (73)
Change-Id: I63cb9c6420cf1db503fc826a8e43b33518000758
Ping-Bug: 15746
Reviewed-on: https://code.wireshark.org/review/33051
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Uli Heilmeier <openid@heilmeier.eu>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2019-05-05 18:56:49 +00:00
Uli Heilmeier 78f3b8afe9 BGP: Fix handling of MPLS label for RFC7432
RFC7432 defines MPLS label with a fixed size and not as a stack.
Each label has 3 bytes and we only decode the first 20 bits. The
remaining four bits are not defined. Therefore we ignore it at the
moment.

Bug: 15631
Change-Id: I27e34e91facb169b804993f2d3ac9c4a181454aa
Reviewed-on: https://code.wireshark.org/review/32578
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-03-26 14:43:57 +00:00