{
 "number": 36718,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36718",
 "title": "netaddress: don't treat multicast addresses as routable",
 "author": "Snan0M",
 "author_association": "FIRST_TIME_CONTRIBUTOR",
 "created_at": "2026-10-31T14:35:35Z",
 "updated_at": "2026-11-01T10:25:46Z",
 "description_hash": "1930c47c5b99c7ab",
 "age_days": 1,
 "draft": false,
 "labels": [],
 "milestone": null,
 "base": "master",
 "head_sha": "d54f486882d4d6919b34b81ede6a681c7079f9e3",
 "head_ref": "netaddress-multicast-not-routable",
 "head_repo": "Snan0M/bitcoin",
 "head_history": [],
 "additions": 22,
 "deletions": 5,
 "changed_files": 4,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "unstable",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "ValeraFinebits"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "unstable",
  "last_author_activity": "2026-10-31T12:24:22Z",
  "last_reviewer_activity": "2026-11-01T10:25:46Z",
  "last_reviewer": "ValeraFinebits",
  "author_silent_days": 1,
  "waiting_on_author_days": 0,
  "days_since_update": 0
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "IsRoutable() doesn't exclude multicast (224.0.0.0/4, ff00::/8), so multicast addresses received over gossip can end up in addrman.\n\nThis adds IsMulticast() and excludes it in IsRoutable().\n\nTest updates:\n- addrman_getaddr: expected counts change, since its generated addresses include the multicast range.\n- The last asmap test vector was a multicast address. I replaced it with a non-multicast one at the top of the range (same AS).",
 "commits": [
  {
   "sha": "d54f486882d4d6919b34b81ede6a681c7079f9e3",
   "date": "2026-10-31T12:24:22Z",
   "message": "netaddress: don't treat multicast addresses as routable\n\nIsRoutable() excluded private, documentation, link-local and other\nspecial ranges, but not multicast (224.0.0.0/4, ff00::/8). Gossiped\nmulticast addresses were therefore accepted into addrman and could be\nselected for outbound connections.\n\nAdd CNetAddr::IsMulticast() and exclude it in IsRoutable().\n\naddrman_getaddr generates addresses with every first octet, so the\nexpected counts drop by the multicast ones. The last asmap test vector\nwas an ff00::/8 address, which now maps to AS0 as unroutable; use a\nnon-multicast address at the top of the range instead (same AS)."
  }
 ],
 "timeline": [
  {
   "t": "2026-11-01T10:25:46Z",
   "kind": "comment",
   "who": "ValeraFinebits",
   "assoc": "NONE",
   "text": "Is this PR intended only to reject new multicast entries, or to prevent multicast connection attempts altogether? Existing multicast entries in addrman remain selectable after an upgrade.",
   "id": "c:6556704303",
   "url": "https://github.com/bitcoin/bitcoin/pull/36718#issuecomment-6556704303",
   "hash": "070194a18c018ac9",
   "edited": null
  }
 ],
 "labels_log": [],
 "state_log": [],
 "text_chars": 1306,
 "text_tokens_estimate": 326,
 "changed_paths": [
  "src/netaddress.cpp",
  "src/netaddress.h",
  "src/test/addrman_tests.cpp",
  "src/test/netbase_tests.cpp"
 ],
 "files": [
  {
   "path": "src/netaddress.cpp",
   "add": 6,
   "del": 1
  },
  {
   "path": "src/netaddress.h",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/test/addrman_tests.cpp",
   "add": 4,
   "del": 3
  },
  {
   "path": "src/test/netbase_tests.cpp",
   "add": 11,
   "del": 1
  }
 ],
 "test_lines": 19,
 "git": {
  "head": "d54f486882d4d6919b34b81ede6a681c7079f9e3",
  "head_matches_backup": true,
  "base": "ab7e668cc6af5d716ad40166d1f88235a2f6d25d",
  "patch_id": "3c7ed81c639a40ac",
  "commits": [
   {
    "sha": "d54f486882",
    "subject": "netaddress: don't treat multicast addresses as routable",
    "files": 4,
    "add": 22,
    "del": 5
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "3c7ed81c639a40ac",
 "input_hash": "b3ce96249a0aeef7",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}