Browse Source

filter "truncate-mac-address-to-24-bits": truncate mac address in AVM UPnP device UUIDs

AVM devices (FRITZ!Box, FRITZ!Repeater) announce UPnP device names
with a fixed middle part and the device's MAC address as last group:

  uuid:XXXXXXXX-bccb-40e7-8e6c-AABBCCDDEEFF

Truncate that group to the OUI, consistent with the existing rule for
colon-separated MAC addresses. Match on the fixed AVM groups rather
than the "uuid:" prefix to also cover UDNs stored without it.
Case-insensitive via GNU sed's I flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 2 weeks ago
parent
commit
206789d91d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gitconfig

+ 1 - 1
gitconfig

@@ -43,7 +43,7 @@
 	textconv = od -t x1z --
 
 [filter "truncate-mac-address-to-24-bits"]
-	clean = sed -E 's/\\b([[:xdigit:]]{2}(:[[:xdigit:]]{2}){2})(:[[:xdigit:]]{2}){3}\\b/\\1:…/g'
+	clean = sed -E -e 's/\\b([[:xdigit:]]{2}(:[[:xdigit:]]{2}){2})(:[[:xdigit:]]{2}){3}\\b/\\1:…/g' -e 's/(-bccb-40e7-8e6c-[[:xdigit:]]{6})[[:xdigit:]]{6}\\b/\\1…/gI'
 	smudge = cat
 	required = true