Commit fe3ea1a
committed
network: correct MAC classification to match RFC 9542 (SLAP)
RFC 9542 replaces RFC 7042 and defines the Structured Local Address Plan (SLAP),
subdividing the locally administered address space into four distinct quadrants:
- Administratively Assigned (x2),
- Reserved (x6),
- Extended Local (xA),
- and Standard Assigned (xE).
Modern systems — including iOS, Android, virtualization platforms, containers,
and privacy-preserving network stacks — use these ranges extensively.
This patch updates the classification logic to implement RFC 9542 semantics:
- Decode SLAP quadrants for local addresses (x2/x6/xA/xE)
- Distinguish global vendor MACs from global addresses with unknown vendors
- Correctly identify multicast addresses (bit 0 set) and avoid mislabeling them as local
- Preserve support for mock ip- addresses and malformed/unknown formats
This improves accuracy for randomized mobile MACs, manufacturer local address
blocks, protocol-assigned local addresses, and security-focused deployments
where correct interpretation of the first-octet bit fields matters.
Signed-off-by: Robin Getz <rgetz503@gmail.com>1 parent 62c55dc commit fe3ea1a
1 file changed
+52
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 182 | + | |
189 | 183 | | |
190 | | - | |
191 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
192 | 235 | | |
193 | 236 | | |
194 | 237 | | |
| |||
0 commit comments