This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ./radix_delete_bug_poc.py | |
| nodes after building tree: 46 | |
| COLLATERAL LOSS: delete('61.4.0.0/12') also removed '61.1.0.0/12', which was still pending and never passed to delete() itself | |
| COLLATERAL LOSS: delete('61.4.0.0/13') also removed '61.5.0.0/13', which was still pending and never passed to delete() itself | |
| COLLATERAL LOSS: delete('61.4.0.0/13') also removed '61.3.0.0/13', which was still pending and never passed to delete() itself | |
| COLLATERAL LOSS: delete('61.2.0.0/15') also removed '61.3.0.0/15', which was still pending and never passed to delete() itself | |
| delete('61.5.0.0/13') raised KeyError('no such address') (already gone) | |
| delete('61.3.0.0/13') raised KeyError('no such address') (already gone) | |
| delete('61.1.0.0/12') raised KeyError('no such address') (already gone) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Proof of concept: py-radix's Radix.delete() silently removes unrelated | |
| prefixes as a side effect of deleting a different prefix. | |
| On a tree built purely with Radix.add() (no prior deletions), deleting a | |
| batch of prefixes one at a time via Radix.delete(prefix) causes some | |
| prefixes that were never passed to delete() to vanish from the tree too. | |
| When the loop later reaches one of those now-vanished prefixes, delete() | |
| correctly raises KeyError for it (it really is gone) - but it should never |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eu | |
| # Example script which will get the number of IPv4 and IPv6 prefixes seen via each ASN in PeeringDB with a non-zero prefix limit. | |
| # For example purposes; script is limited to the first 10 ASNs in PeeringDB, and one route collector, route-views.isc. | |
| # Possible usage would be to query the broken API (https://status.broker.bgpkit.com/?tab=collectors) for a few route collectors | |
| # which DON'T have this ASN connected, but DO have a few full table feeds each, to get a world view of that ASN. | |
| # This script uses a locally built Monocle binary, the docker image can't be used until v1.4 is released: | |
| # https://github.com/bgpkit/monocle/milestone/11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Draft Policy Name: Require newly created AS-SETs to have hierarchical names | |
| ID: AFPUB-2026-ASN-001-DRAFT01 | |
| Submission Date: 2026/05/15 | |
| Version: 2.0 | |
| Author(s): | |
| (a) Name: James Bensley | |
| (b) Email address: james@inter.link | |
| (c) Affiliation: Inter.link GmbH | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait Parent { | |
| fn print_x(&self) { | |
| println!("X is: {}", self.get_x()); | |
| } | |
| fn get_x(&self) -> u16; | |
| } | |
| trait Child: Parent { | |
| fn child_fn(&self) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| ASN to AS-SET mapping: | |
| AS4200000011 -> AS-A1 | |
| AS4200000021 -> AS-B1 | |
| AS4200000022 -> AS-B2 | |
| AS4200000023 -> AS-B3 | |
| AS4200000031 -> AS-C1 | |
| AS4200000032 -> AS-C2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <inttypes.h> // uint*_t | |
| #include <stdio.h> // perror(), printf() | |
| #include <stdlib.h> // memcpy, posix_memalign() | |
| #include <string.h> // malloc() | |
| #include <time.h> // clock_t, CLOCKS_PER_SEC | |
| #include <unistd.h> // getpagesize() | |
| static inline void memcpy_aligned(void *to, const void *from, size_t len) { | |
| if (len <= 64) { | |
| memcpy(to, from, 64); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Not all functions are referenced below are called, that is intentional to verify that they are not being called. | |
| // Provide timestamps: | |
| function print_ts() { | |
| ts = gettimeofday_us(); | |
| printf("[%10d.%06d] ", ts/1000000, ts%1000000); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Kills all iptables rules and unloads all iptables/netfilter related | |
| # kernel modules. | |
| # | |
| # From: https://github.com/netoptimizer/network-testing/blob/master/bin/netfilter_unload_modules.sh | |
| # Author: Jesper Dangaard Brouer <netoptimizer@brouer.com> | |
| # Trick so, program can be run as normal user, will just use "sudo" | |
| if [ "$EUID" -ne 0 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Code from https://github.com/cisco-grpc-connection-libs/ios-xr-grpc-python/blob/master/examples/grpc_cfg.py | |
| from grpc.framework.interfaces.face.face import AbortionError | |
| import json | |
| from time import sleep | |
| import sys | |
| sys.path.insert(0, '../') | |
| from lib.cisco_grpc_client import CiscoGRPCClient | |